I need to compute a TEXTURE_2D with one 8-bit component by using a one component 32-bit TEXTURE_RECTANGULAR_ARB. Then, my first step is to copy the content of TEXTURE_2D into a framebuffer created with a TEXTURE_RECTANGULAR_ARB (GL_FLOAT_R32_NV).
I copy the TEXTURE_2D using this code:
glTexCoord2i(0, 0); glVertex3i(0, 0, 0);
glTexCoord2i(1, 0); glVertex3i(512, 0, 0);
glTexCoord2i(1, 1); glVertex3i(512, 512, 0);
glTexCoord2i(0, 1); glVertex3i(0, 512, 0);
I don’t understand why the content of the fbo at the end of this copy is different from the original TEXTURE_2D. Seems that the 8-bit values are changed when they are transferd to 32-bit framebuffer. Is it possible? Any idea?