I am using an FBO created from the following texture definition:
glTexImage2D( GL_TEXTURE_RECTANGLE_ARB, 0, GL_RG16F, 1920, 1080, 0, GL_RG, GL_HALF_FLOAT, NULL );
glFramebufferTexture2DEXT( GL_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT0_EXT, GL_TEXTURE_RECTANGLE_ARB, texture/*generated earlier and bound*/, 0 );
Then I read the FBO data into a VBO:
glBindBuffer( GL_PIXEL_PACK_BUFFER_ARB, vbo );
glReadPixels( 0, 0, 1920, 1080, GL_RG, GL_HALF_FLOAT, NULL );
glBindBuffer( GL_PIXEL_PACK_BUFFER_ARB, 0 );
Now use vbo to render:
glEnableClientState(GL_VERTEX_ARRAY);
glBindBuffer(GL_ARRAY_BUFFER_ARB, vbo);
glVertexPointer ( 2, GL_HALF_FLOAT, 0, 0 ); // tried GL_ARB_half_float_vertex as well
It does render but with accuracy errors. I traced it back to the values seem to quantize to integers beginning at x = 1024. 1023.5 is fine. When I set 1024.5 it comes out as 1024. I thought this might be some sort of issue with the FBO half float being hinted as an image rather than vertex data but I am not sure what do do with that thought.
appreciate any help,
David Patrick Farmer