Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 9 of 9

Thread: Fullscreen?

  1. #1
    Junior Member Newbie
    Join Date
    Feb 2000
    Location
    Osby, Sweden
    Posts
    15

    Fullscreen?

    Hi!
    How do i do fullscreen rendering? I use CreateWindow now, but i cant find out how to make it fullscreen. Is it ChangeDisplaySettings i should use? If so, should it be before or after the CreateWindow?

    Thanks for your time!

  2. #2
    Advanced Member Frequent Contributor
    Join Date
    Feb 2000
    Posts
    569

    Re: Fullscreen?

    you use changedisplaysettings.

    If you look at msdn.com, you can see the definition of the function.

    changedisplaysettings takes a DEVMODE and a couple of flags.

    for fullscreen, you pass CDS_FULLSCREEN

    You can change the display setting before or after you create the window, it doesn't really matter. It depends when you start rendering stuff.

    if after the first resize, you draw the window, then change the display settings before you call updateWindow or some objects will be rendered in the old resolution and then be switched to the new one. This look kind of ugly.

  3. #3
    Junior Member Regular Contributor
    Join Date
    Feb 2000
    Posts
    211

    Re: Fullscreen?

    Yes, the above mentioned way ist correct !
    But there is an other way too !
    You can use CreatWindowEX, change the
    resolution to the maximum desktop-resolution,
    display your window without a titlebar.
    This should work to, i have a source-code-demo which is doing it this way !
    But,mmh where is it...
    Send me your email-adress, and i will post it
    to your account.
    Or i send you se URL, let me see where it is on my harddisk.
    DJSnow

  4. #4
    Junior Member Newbie
    Join Date
    Feb 2000
    Location
    Osby, Sweden
    Posts
    15

    Re: Fullscreen?

    Is it a "fake" fullscreen mode if i do like this? : CreateWindow("OpenGL", title,WS_POPUP,x, y, width, height, NULL, NULL, hInstance, NULL);
    ??
    Is it a good way to do a fullscreen mode?

  5. #5
    Guest

    Re: Fullscreen?

    The second method I think would be too slow, depending on your current windows resolution and your application. Running an openGl program in 1024x768 (for example) would be pretty slow if it's animated, unless you had some pretty good hardware. Anyway, that's my opinion, and I'm new at this, so take it or leave it.

  6. #6
    Advanced Member Frequent Contributor
    Join Date
    Feb 2000
    Posts
    569

    Re: Fullscreen?

    I never tried that way but it should be ok cOg. One thing you could test that could be annoying is moving your mouse cursor to the bottom of the screen and see if the taskbar show up.

  7. #7
    Junior Member Regular Contributor
    Join Date
    Feb 2000
    Posts
    211

    Re: Fullscreen?

    The Taskbar doesnīt move up with my way, if you point with the mouse on it. Itīs no fake-fullscrenn: it only takes the actual resolution. There are many OpenGL-appz which are using the current X/Y-size & colordepth of your desktop-settings. Unfortunately, i havenīt found the source on my harddisk-i must check the web. Be patient...
    DJSnow

  8. #8
    Junior Member Newbie
    Join Date
    Feb 2000
    Location
    SubVobWee, near Rigel
    Posts
    22

    Re: Fullscreen?

    Simply check the desktop resolution, if it's too big, then set it to a smaller value.
    Record that value, and when creating you're main window, pass it as the width and height.
    Then simply call "GetWindowDC()" to get a handle to the *Entire* main window, including title bar, and start drawing away!


    Mike The Spike

  9. #9
    Junior Member Newbie
    Join Date
    Feb 2000
    Location
    Osby, Sweden
    Posts
    15

    Re: Fullscreen?

    Thanks guys for your time!

Posting Permissions

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