Jump to content
  • Advertisement


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


OpenGL animation with MFC

This topic is 6183 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''ve written a simple program in WIN32 Console Application that rotate always a triangle until the user quits the program. I''ve use glutIdleFunc(func) to increase the rotation angle and glutPostRedisplay() to refresh the display. Now I want to write the same program with MFC-Application. Can I use glutIdleFunc(func) and glutPostRedisplay() ? Can somebody help me ? bondi

Share this post

Link to post
Share on other sites
Um no I don''t think glutxxxx will work with MFC.
The easiest thing to do, is to create a timer (via SetTimer), and handle the ON_TIMER event.

Or, if you really want to use the idle time, you need to make your window modeless, and then CApp has an OnIdle method you can override. There was an example on msdn.microsoft.com showing how to do this.

It''s a much cleaner solution, imo, to create a seperate thread to render the graphics.

Magmai Kai Holmlor
- Not For Rent

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!