Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

jag_oes

Pixel Color

This topic is 5963 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 determine the color of a pixel? This is being done in 2D in Open GL ... something like "glGetColor (0.0f, 0.0f)" that will return the color of the pixel at (0,0). Or some equivalent? Thanks

Share this post


Link to post
Share on other sites
Advertisement
you can use glReadPixel(), but you should really not be using functions like this. if you want to a 2d game use directdraw with a system buffer so reads will be fast. unfortunatly reads from vram are uber slow and video cards are designed for writes to vram not reads.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

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

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!