Archived

This topic is now archived and is closed to further replies.

ycliao

render cube texture use wgl_render_texture

Recommended Posts

I''m looking for a sample of render cube texture (dynamic cube texture) which is implemented by using wgl_render_texture(pbuffer). Can someone help me? Thank you

Share this post


Link to post
Share on other sites
This post is going to be completely not helpful, but I need a bit more information about what you''re doing...

I can''t find what exaclt wgl_render_texture does, so I''m not really sure what you''re looking for. What exactly are you trying to accomplish? Taking a wild guess, it looks like you''re trying to do some sort of dynamic environment/cube mapping, but I don''t really see what you''d need a texture for, because you''d just grab the texture from your scene. Can you clarify a bit please?

<-- that''s still a link if you didn''t notice
"Gay marriage will encourage people to be gay, in the same way that hanging around tall people will make you tall." - Grizwald

Share this post


Link to post
Share on other sites
I want to accomplish a dynamic environment cube mapping texture.
Most samples are used glCopyTexSubImage2D.
But I want to using pbuffer to accomplish it.

Share this post


Link to post
Share on other sites
in the sgi docs on wgl_render_texture, they say the difference between using a standard 2d texture and a cube map is that the WGL_TEXTURE_TARGET_ARB param passed into wglChoosePixelFormatARB becomes WGL_TEXTURE_CUBE_MAP_ARB instead of WGL_TEXTURE_2D_ARB...

you render each face in turn, as you normall would render into a pbuffer, but before each of the 6 faces you render, you call wglSetPbufferAttribARB to set which face you are currently rendering to.

| - My project website - | - email me - |

Share this post


Link to post
Share on other sites