Jump to content
  • Advertisement

Archived

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

osh

glDrawPixels strange behavior

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

Hello! I''m writing sw raterizer and for it''s testing i need to draw buffer to screen using glDrawPixels. I want to use unsigned 32bit integer depth as luminance value using this call: glDrawPixels(256, 256, GL_LUMINANCE, GL_UNSIGNED_INT, screen); But I can''t see anything. I can only see value 0xFFFFFFFF. I suppose that color is lineary mapped (I mean that 0xFFFFFFFF should be 1.0) Anyone know what''s wrong?

Share this post


Link to post
Share on other sites
Advertisement
if youre grabbing the values from the depthbuffer you should know that moste values are near the camera, and just a fraction away from the zNear everything is pretty high( and will end up white)

you probably need to scale or bias the value bevore viewing it

Share this post


Link to post
Share on other sites
I don''t use OpenGL depth buffer, I use my own rasterizing func. Problem is that I can''t see any luminance value except 0xFFFFFFFF...

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.

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!