添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接
相关文章推荐
豪爽的手套  ·  OpenGL Textures and ...·  1 周前    · 
侠义非凡的硬盘  ·  Linux/AM5728: OpenGL ...·  1 周前    · 
无邪的楼房  ·  glDeleteTextures ...·  1 周前    · 
骑白马的豆芽  ·  Memory leak loading ...·  1 周前    · 
独立的冲锋衣  ·  How to clamp texture ...·  1 周前    · 
性感的黄豆  ·  pmdarima.arima.auto_ar ...·  2 月前    · 
豪情万千的芹菜  ·  Nbconvert :: Anaconda.org·  6 月前    · 
霸气的手套  ·  致全体市民的一封信·  6 月前    · 
I am using a pbuffer in OpenGL ES 1.1 to render to texture. I followed the information in this post here
http://discussion.forum.nokia.com/forum/showthread.php?159777-OpenGL-render-to-texture&p=548409&viewfull=1#post548409 .

Like the poster in that thread I have two contexts, one for the main window and one for the pbuffer. I render to the pbuffer surface and then the window surface draws a quad using the pbuffer as a texture.

What I’ve found is that to get eglBindTexImage to actually contain the pbuffer contents I had to do

// Need to set the surface to the pbuffer, but the context to the window context that // is going to use texture eglMakeCurrent(display, pbufferSurface, pbufferSurface, windowContext); glEnable(GL_TEXTURE_2D); glBindTexture(GL_TEXTURE_2D, pbufferTexture); eglBindTexImage(g_display, pbufferSurface, EGL_BACK_BUFFER)) // Set the surface and context to the window ready for the actual draw eglMakeCurrent(display, windowSurface, windowSurface, windowContext);

Can someone explain to me why the the first eglMakeCurrent has to be pbufferSurface but windowContext? I would have expected windowSurface,windowContext to be the correct setting, but that creates a texture with the current contents of the windowSurface (which I find really strange).

Cheers,

Stuart.