PDA

View Full Version : PBuffering problems



anthony
01-30-2004, 06:47 AM
Hi.
I'm a bit new too all this, but from the documentation I've read it seems that once I should be able to use the pbuffer as a texture-map. I'm using the WGL_NV_render_texture_rectangle extension as well as the pbuffering ones and the render to texture ones...

So after doing all the extension stuff (which gives no errors)
I do:

glGenTextures(1, &texID);

then when I want to use it as a texturemap:

wglBindTexImageARB(pbuf, WGL_FRONT_LEFT_ARB);
glBindTexture(GL_TEXTURE_2D, texID);

All I get is a white quad instead of the correct texture, why?

thanks

-anthony

[This message has been edited by anthony (edited 01-30-2004).]

Obli
02-02-2004, 10:26 AM
Originally posted by anthony:
...I'm using the WGL_NV_render_texture_rectangle extension as well as the pbuffering ones and the render to texture ones...
I do:

glGenTextures(1, &texID);

then when I want to use it as a texturemap:

wglBindTexImageARB(pbuf, WGL_FRONT_LEFT_ARB);
glBindTexture(GL_TEXTURE_2D, texID);
...
I see you're naming rectangular texture support, however I wonder why you bind to TEXTURE_2D. If buffer is really non-potd then you should bind to rectangular textures. If you do that, of course you get a white quad! The texture is ill-formed.

Also, try to just draw it to the framebuffer. It could help.

chemdog
02-16-2004, 04:14 AM
glBindTexture(GL_TEXTURE_RECTANGLE_NV, texID); should be the correct solution.
SSI's extension registry non-ARB#264, and non-ARB#229, contain relevant information.