ReadPixels

Started by
2 comments, last by gold 18 years, 2 months ago
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.
"We've all heard that a million monkeys banging on a million typewriters will eventually reproduce the entire works of Shakespeare. Now, thanks to the internet, we know this is not true." -- Professor Robert Silensky
Advertisement
I'm surprised that happened so I rather doubt it. Do you have lighting enabled?
Keys to success: Ability, ambition and opportunity.
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.
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.

This topic is closed to new replies.

Advertisement