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.
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, texture, RECT; TEX tex1, fragment.texcoord, texture, RECT;
Has anyone any clue on this?
Thanks in advance,