Hi,
I have successfully rendered into two rectangle float pbuffers (they do have different content). Now I want to bind these two buffers to two different texture units (with two different texture objects) and render them in a fragment program to the window’s frame buffer.
Problem:
It seems, that I can only sample from the last pbuffer I’ve bound using wglBindTexImage().
Here’s the code I use for settung up the pbuffers (no texture enabling because of the fragment program):
glActiveTextureARB(GL_TEXTURE0);
glBindTexture(GL_TEXTURE_RECTANGLE_ARB, 1);
wglBindTexImage(pBuffer1, WGL_FRONT_LEFT);
glActiveTextureARB(GL_TEXTURE1);
glBindTexture(GL_TEXTURE_RECTANGLE_ARB, 2);
wglBindTexImage(pBuffer2, WGL_FRONT_LEFT);
The following fragment program code ALWAYS samples from the last pbuffer I’ve bound:
TEX tex0, fragment.texcoord[0], texture[0], RECT;
TEX tex1, fragment.texcoord[1], texture[1], RECT;
Has anyone any clue on this?
Thanks in advance,
Jay