page flipping and double buffering

Started by
-1 comments, last by a38750 23 years, 8 months ago
Ok, I don''t get this. Most people seem to use page flipping. This means you have to redraw the screen for every frame, instead of just modifying the previous frame. In the menu system in a game I''m making, I''m currently using a backbuffer, which is blitted to the primary surface. My mouse routines work by saving the background of where the mouse cursor will be drawn to another surface, drawing the mouse, and replacing the background when the mouse is redrawn. This method causes a few glitches which I''m finding hard to solve, (bits of old screens are kept in the saved backgroundwhen the menu is changed for example). My question is: is it the accepted way to redraw the entire screen each frame. eg. in my case: draw the background, draw the text and controls etc., then draw the mouse. It seems very wasteful of precious CPU speed, especially as I''m using a font system (each character is blitted individually with colour key), to do this. Obviously in the game (which is 3D) this doesn''t matter as the entire scene has to be redrawn, but in a menu system? Secondly (sorry if I''m ranting on here), I wan''t to use different resolutions for the menu system and for the game. If I create a DirectDraw backbuffer without 3DDEVICE in its caps, at 640x480, I can then create another backbuffer with 3DDEVICE caps (for the rendering target in the game) at the same resolution, but not at a higher one. How can I do this, completely separate DirectDraw interfaces? Thanks, Frank

This topic is closed to new replies.

Advertisement