开发者

Is it possible to access OpenGL ES 2.0 texture memory directly on an embedded platform?

开发者 https://www.devze.com 2023-01-21 09:22 出处:网络
I\'m working on some GP-GPU code on an OMAP 3530-based platform and I\'m being stymied by the lack of a glGetTexImage function in openGL ES 2.0.Since the platform u开发者_Python百科ses integrated memo

I'm working on some GP-GPU code on an OMAP 3530-based platform and I'm being stymied by the lack of a glGetTexImage function in openGL ES 2.0. Since the platform u开发者_Python百科ses integrated memory for the GPU, I was wondering if there's any kind of hack I can do to get a pointer directly to an allocated texture in memory. This way I could read my data back without having to push it through the framebuffer, which throws away a lot of data.


As far as I know there is no way to do what you describe. The closest and most efficient way to do that would be rendering to an FBO, this way one could bind the texture as the color buffer and use glReadPixels to get the pixels back. This still requires reading the Framebuffers due to glReadPixels api. There are a few advantages of using FBOs over other methods though:

  1. you can create and use multiple FBOs within the same EGLContext (no need for a context switch, if you were to use a PBuffer for instance)
  2. you can share color (and depth/stencil) buffers across FBOs
  3. you can attach textures directly to the FBO without the need to do a copy operation
0

精彩评论

暂无评论...
验证码 换一张
取 消