Results 1 to 3 of 3

Thread: FullScreen ?

  1. #1

    Thread Starter
    Lively Member slx47's Avatar
    Join Date
    Apr 2002
    Location
    US
    Posts
    127

    FullScreen ?

    i am making a opengl program and was wondering how would i make it full screen. When i put this code in the compiler says its wrong:

    Code:
    DEVMODE devModeScreen;
    memset(&devModeScreen,0,sizeof(devModeScreen));
    devModeScreen.dmSize = sizeof(devModeScreen);
    devModeScreen.dmPelsWidth = screenWidth;
    devModeScreen.dmpelsHeight = screenHeight;
    devModeScreen.dmBitsPerPel = screenBpp;
    devModeScreen.dmFields = DM_PELSWIDTH | DM_PELSHEIGHT | DM_BITSPERPEL;
    
    if (ChangeDisplaySettings(&devModeScreen, CDS_FULLSCREEN) != DISP_CHANGE_SUCCESSFUL)
    fullscreen = false;

  2. #2
    Frenzied Member HarryW's Avatar
    Join Date
    Jan 2000
    Location
    Heiho no michi
    Posts
    1,827
    I've never written any OpenGL code before but I did notice an inconsistency on yoru code:

    Code:
    devModeScreen.dmpelsHeight = screenHeight;
    probably ought to be:
    Code:
    devModeScreen.dmPelsHeight = screenHeight;
    Harry.

    "From one thing, know ten thousand things."

  3. #3
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    Just as a quick request, next time you have a problem with compilation if you could post the compiler errors as well it makes it a bit easier since most of the time it's something obvious.

    Check out http://nehe.gamedev.net for some helpful tips for OpenGL
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width