Jump to content
  • Advertisement
Sign in to follow this  
TacomaBlack

OpenGL Help with Screen Capture

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

I'm trying to capture the screen OpenGL with glReadPixels. The problem I have is that it's reading the background color but not the textured geometry.

        unsigned char* data = (unsigned char*)malloc(w * h * 3);
	glReadBuffer(GL_FRONT);
	glReadPixels(0,0,w,h,GL_RGB,GL_UNSIGNED_BYTE,data);

Share this post


Link to post
Share on other sites
Advertisement
Everything is already displayed on the screen, background and the texture (j2k image). Displaying the texture was no problem. After the display I use glReadPixels to get the pixels on the screen. I choose the front buffer because that is the buffer that is being displayed.

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!