Sign in to follow this  

ReadPixels

This topic is 4334 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

If lets say I draw a square with colors 50,60,70 and with ReadPixels I get 49,61,72. Will I get those numbers every time that I draw 50,60,70 (with the same screen settings) , or will it be a little different each time? I'm asking cause I'm doing color coding for mouse recognition in 3D so it would be good if I always get the same output for a certain color. Thanks.

Share this post


Link to post
Share on other sites
I understand that the OpenGL standard does not specify very strictly "how" the rendering should look in screen, so the outcome may vary between different implementations/platforms/drivers. I'm not sure if that's the general case, though.

Share this post


Link to post
Share on other sites
I would expect LSB errors, especially if you are using a 16-bit color buffer and dither is enabled. OpenGL does require a relative amount of accuracy (the conformance test fails if the implementation is too far off).

Try disabling dither, and make sure you are using a 32-bit color buffer. I would expect fairly reproducible results. OpenGL has a requirement of invariance, meaning that the same color drawn in multiple locations should be the same regardless of the window position. Obviously dither is an exception.

Share this post


Link to post
Share on other sites

This topic is 4334 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this