Jump to content
  • Advertisement

Archived

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

waterLINK

OpenGL MFC & openGL?

This topic is 6061 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''m testing openGL with MFC. I have downloaded a test program about it and the only thing it does is painting a cube rotating. When it draws the cube? Well, on the function OnPaint(...). That function calls to RenderScene() function that draws the cube. If you run the application and don''t move the mouse, don''t resize de window, don''t press any key and don''t do nothing the appication continues executing the OnPaint() function, thus makeing the rotation of the cube (an animation). So, why the aplicacion calls OnPaint() function, if I don''t do nothing to invoke a redraw of the window? Has openGL internally something related?, perhaps with the active rendering context, that produce that redraw of the window. Thanks.

Share this post


Link to post
Share on other sites
Advertisement
I think MFC calls OnPaint whenever it needs to paint. That''s why you put the OGL rendering function in there. It''s been awhile since I messed with MFC so I could be wrong.

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!