dimensionX
06-01-2007, 10:37 AM
I'm trying to load data into a texture with internal format = GL_FLOAT_RG16_NV
g_poFbo->BindFramebufferObject(true);
glDrawBuffer(GL_COLOR_ATTACHMENT0_EXT);
glClear(GL_COLOR_BUFFER_BIT);
glWindowPos2i(0, 0);
glPixelZoom(1.0f, 1.0f);
glColorMask(GL_TRUE, GL_FALSE, GL_FALSE, GL_FALSE);
glDrawPixels(g_iWidth, g_iHeight, GL_RED, GL_FLOAT, pfRed);
glColorMask(GL_FALSE, GL_TRUE, GL_FALSE, GL_FALSE);
glDrawPixels(g_iWidth, g_iHeight, GL_GREEN, GL_FLOAT, pfGreen);
glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE);
g_poFbo->BindFramebufferObject(false);When I read the values out they are off in the 4th decimal place. Is this normal ?
When I use GL_FLOAT_RG32_NV everything is fine.
g_poFbo->BindFramebufferObject(true);
glDrawBuffer(GL_COLOR_ATTACHMENT0_EXT);
glClear(GL_COLOR_BUFFER_BIT);
glWindowPos2i(0, 0);
glPixelZoom(1.0f, 1.0f);
glColorMask(GL_TRUE, GL_FALSE, GL_FALSE, GL_FALSE);
glDrawPixels(g_iWidth, g_iHeight, GL_RED, GL_FLOAT, pfRed);
glColorMask(GL_FALSE, GL_TRUE, GL_FALSE, GL_FALSE);
glDrawPixels(g_iWidth, g_iHeight, GL_GREEN, GL_FLOAT, pfGreen);
glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE);
g_poFbo->BindFramebufferObject(false);When I read the values out they are off in the 4th decimal place. Is this normal ?
When I use GL_FLOAT_RG32_NV everything is fine.