
593.9. Fullscreen or Windowed
//-----------------------------------------------
// Constants
//-----------------------------------------------
// window
const char CLASS_NAME[] = "Spacewar";
const char GAME_TITLE[] = "Game Engine Part 1";
const bool FULLSCREEN = false; // windowed or fullscreen
const UINT GAME_WIDTH = 640; // width of game in pixels
const UINT GAME_HEIGHT = 480; // height of game in pixels
Listing 3.21. Constants
// Initialize Graphics, throws GameError
graphics->initialize(hwnd, GAME_WIDTH, GAME_HEIGHT, FULLSCREEN);
Listing 3.22. Initializing graphics in Winmain.
If fullscreen is true, we are setting the format of the back buer to D3DFMT_X8R8G8B8 ...