glClear clamping colors to FBO
Is there a way to stop glClear() from clamping the color values written to an FBO? I've tried to use:
glClampColorARB(GL_CLAMP_VERTEX_COLOR_ARB, GL_FALSE);
glClampColorARB(GL_CLAMP_READ_COLOR_ARB, GL_FALSE);
glClampColorARB(GL_CLAMP_FRAGMENT_COLOR_ARB, GL_FALSE);
glClearColor(1000.0f, 0, 0, 0);
glClear(GL_COLOR_BUFFER_BIT);
But the values read back from the FBO show that they still being clamped. The FBO is set to GL_RGB32F_ARB which works fine when using cg fragment programs. It seems opengl is messing with me. glColor3f() also appears to be doing the same thing in this respect.
Works fine for me and I don't need to call any of those glClampColorARB.
Are you reading your FBO like this?
glReadPixels(0, 0, 1, 1, GL_BGRA, GL_FLOAT, pixels);
because I get {0, 0, 1000.0, 0}
Are you reading your FBO like this?
glReadPixels(0, 0, 1, 1, GL_BGRA, GL_FLOAT, pixels);
because I get {0, 0, 1000.0, 0}
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement