Jump to content
  • Advertisement
Sign in to follow this  

Question On Windows Flashing During Animation

This topic is 5193 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 have a question regarding animation on Windows APP. I'm using MFC, CDC, and Visual C++ to do 2-D animation inside a Window. I have an image that I draw and I want it to move about inside my Window. I have a thread which calls a func to perform the needed transformation calculations. This function draws the new image to a bitmap. Then the function calls the OnPaint routine to StretchBlt the bitmap. The entire image flashes for a second when I invalidate the window to update the image. I tried to over-load the OnEarseBackground, but it did nothing. I thought drawing to a bitmap instead of drawing to the screen prevented this sort of screen flashing. Is the window re-drawing my entire image each time I invalidate the window??? I'm using the CDC instead of OpenGL. Should I just go ahead and switch over. I've been coming across lots of different little problems. The only real reason I'm using CDC is because of the bitmap functionality. I intend to draw to one single bitmap, but have multiple windows display the same image in different fashion (ie using stretch blt to zoom and another window pan to another area of the image). Can I something similar in OpenGL? Thanks in advance for any help. Sorry, I have so many questions.

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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!