Jump to content
  • Advertisement
Sign in to follow this  
metamind

OpenGL archtitecture with callback

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

Hi,

I am working on an application to read in frames from a capture card and put them into a Pixel Buffer Object. I am pretty new to OpenGL.

How do it get it so that the screen updates when a new frame comes in and disable the glutDisplayFunc loop?

Thanks

Share this post


Link to post
Share on other sites
Advertisement
If you already have some implementation based on GLUT, I someone else will have to help you.

Otherwise, I think glfw is much better than GLUT. Especially as glfw allows you full control of the main loop.

Share this post


Link to post
Share on other sites
In GLUT there is a glutPostRedisplay() function that will redraw the screen for you. I'm not sure that this will pump any user inputs (as it would in GLFW), but it may. When you get a new caputure frame, update your PBO and then then call the postRedisplay() function to ask GLUT to redraw the screen.

GLUT and FreeGLUT are pretty old. I recommend GLFW as well (full disclosure: I've contributed to it in the past). It's a great windowing framework and gives you the primitives to build your own loop around.

Cheers,

Bob

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!