Win32 Game Development - To dream game --Bitblt we never goes out () does not show when rendering images

       Bloggers junior year, the school opened a game programming this course, use vs + win32 environment to make two-dimensional and three-dimensional games (two-dimensional realization has begun, just completed three-dimensional aspects of drawing beizer surface and Coons surfaces, is about to begin production of three-dimensional CS), now sum up a two-dimensional game pit production process stepped on.

       Bloggers intend to use an object-oriented thinking achieve the object generates a game, a game meant to write object class, then the main function of the game object is instantiated.

       After the realization of this kind, bloggers examples of the game object and call methods to draw graphics object of the game to draw the game objects.

       But I encountered such a problem: When the game running for some time, draw the object again Shique game does not show up. The solution is corresponding to the bitmap on the object and bufdc are initialized in the main function, the transfer mode to the parameter passing through the object drawing method for drawing process is invoked, and before drawing, is successful. Be sure to remember that each game object is best to have a separate corresponding bufdc and bitmap, in order to prevent conflicts, leading to display failure.

Guess you like

Origin blog.csdn.net/qq_38327353/article/details/93771250