OpenLayer Offline Manual

OpenLayer | Setup | SetupScreen SetupScreen
static bool SetupScreen( | int width, int height, bool fullscreen = true, int colorDepth = 32, int zDepth = 8, int refreshRate = [automatic] );
Sets up the program window or the fullscreen mode with the given color depth and Z depth. Returns true in success. You can pass FULLSCREEN or WINDOWED as the fullscreen parameter instead of a boolean. Width and height tell the screen resolution (fullscreen mode) or the window size (windowed mode) in pixels. The color depth should be 16 or 32. Generally this function should be called right after Setup::SetupProgram because you can't use any Bitmaps or TextRenderers before you've set up the screen! zDepth is the accuracy of the built-in depth sorting and should be 8, 16 or 32, but you don't usually have to worry about it unless you know what you're doing. You can simply leave it to be the default value. Examples // Setup 32-bit fullscreen mode with the resolution of 1024 x 768 // Setup::SetupScreen( 1024, 768, true, 32 ); // Does the same as above but by using the FULLSCREEN constant // Setup::SetupScreen( 1024, 768, FULLSCREEN, 32 ); // Setup 32-bit windowed mode with the window size of 800 x 600 // Setup::SetupScreen( 800, 600, false, 32 ); // Does the same as above but by using the WINDOWED constant // Setup::SetupScreen( 800, 600, WINDOWED, 32 ); // You can also leave the color depth parameter out if you want 32-bit graphics // Setup::SetupScreen( 800, 600, WINDOWED ); // Setup 32-bit fullscreen mode with the window size of 800 x 600 // // and the maxium Z buffer accuracy // Setup::SetupScreen( 800, 600, FULLSCREEN, 32, 32 ); Other functions of the class Setup
SetupProgram | Sets up OpenLayer and the other libraries
SetupScreen | Sets up the program window or the fullscreen mode
GetWindowWidth | Returns the width of the program window
GetWindowHeight | Returns the height of the program window
GetColorDepth | Returns the color depth of the program window
GetExecutablePath | Returns the path of the program executable
ToAbsolutePathname | Converts the relative pathname to an absolute one
Advanced functions
IsProgramSetUp | Returns true if SetupProgram is called
IsScreenSetUp | Returns true if SetupScreen is called
Back to the main page of the manual Questions about SetupScreen? Click here.