Jump to content
  • Advertisement
Sign in to follow this  
InetRoadkill

OpenGL glClear clamping colors to FBO

This topic is 3738 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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.

Share this post


Link to post
Share on other sites
Advertisement
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}

Share this post


Link to post
Share on other sites
I'm actually using:

glReadPixels(0, 0, 1, 1, GL_RGB, GL_FLOAT, pixels);

I suspect it's a driver issue. I have a cg program as a work-around for now.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!