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: Full Screen Mode

  1. #1
    Junior Member Newbie
    Join Date
    Jan 2002
    Location
    Kyyv, Kyyv, Ukraine
    Posts
    17

    Full Screen Mode

    Does anybody know how set something like an exlusive mode using Only OpenGL, without having any business with DirectX? And to adjust Screen Resolution I want?
    Thnx.

  2. #2
    Member Regular Contributor
    Join Date
    Jul 2000
    Location
    Arlon, Belgium
    Posts
    486

    Re: Full Screen Mode

    Glut

  3. #3
    Senior Member OpenGL Guru zed's Avatar
    Join Date
    Jul 2000
    Location
    S41.16.25 E173.16.21
    Posts
    2,609

    Re: Full Screen Mode

    i prefer sdl to glut

  4. #4
    Member Regular Contributor
    Join Date
    Nov 2000
    Location
    Huntsville, AL. USA
    Posts
    319

    Re: Full Screen Mode

    It cant be done with OpenGL alone. Why? Because OpenGL is not a windowing API, rather it is a graphics API for rendering stuff in previously acquired contexts. You can use glutFullScreen() if you are using the GLUT tooliit, you can use ChangeDisplaySettings() in the Win32 API. I am sure there are other ways but the answer is that OpenGL aint gonna do it for ya.
    Obsessive - A word used by the lazy to describe the motivated.

  5. #5
    Junior Member Newbie
    Join Date
    Jan 2002
    Location
    Kyyv, Kyyv, Ukraine
    Posts
    17

    Re: Full Screen Mode

    Ok. glut. But I'm using Borland Builder C++ and it doesn't support neither GLUT nor GLAUX! What should I Do?
    Isn't it dangerous to use DirectDraw, for instance, with OpenGL. I mean functions like:
    - SetCooperativeLevel;
    - SetDisplayMode.
    Thnx

  6. #6
    Junior Member Regular Contributor
    Join Date
    Sep 2001
    Location
    Eastern USA
    Posts
    220

    Re: Full Screen Mode

    There's a plain vanilla Win32 call named ChangeDisplaySettings. It should do what you need, so do look it up.

  7. #7
    Intern Contributor
    Join Date
    Sep 2000
    Location
    Copenhagen, Denmark
    Posts
    61

    Re: Full Screen Mode

    You might want to take a look at this tutorial:http://nehe.gamedev.net/tutorials/lesson01.asp

    It explains how to set up a full screen app. without Glut. There should be a link at the bottom for a Borland 5.0 implementation of it. Hope it helps.

  8. #8
    Junior Member Newbie
    Join Date
    Jan 2002
    Location
    Kyyv, Kyyv, Ukraine
    Posts
    17

    Re: Full Screen Mode

    Thank You ALL. It works. I hope for Your help in future

  9. #9
    Advanced Member Frequent Contributor marcus256's Avatar
    Join Date
    Aug 2001
    Location
    Sweden
    Posts
    853

    Re: Full Screen Mode

    I'm not sure about how GLUT does it, but the NeHe version has some flaws (for instance it does not handle ALT+TAB situations). Version 2.0 of GLFW will do the trick. It will hopefully be released within a few weeks, until then you can check out GLFW 1.0.2 at http://opengl.freehosting.net/glfw/

    With GLFW you open a fullscreen window with the command:
    Code :
    // GLFW v1.x
    glfwOpenWindow(
        640, 480,        // Screen size
        5, 6, 5,         // R,G,B bits
        0,               // Alpha bits
        16,              // Depth bits
        0,               // Stencil bits
        GL_TRUE          // We want fullscreen
    );
     
    // GLFW v2.x
    glfwOpenWindow(
        640, 480,        // Screen size
        5, 6, 5,         // R,G,B bits
        0,               // Alpha bits
        16,              // Depth bits
        0,               // Stencil bits                
        GLFW_FULLSCREEN  // We want fullscreen
    );
    Unlike the NeHe code, you will always get fullscreen mode if you request it (but it may have other dimensions and/or color/alpha/stencil buffer depths than you request). Under GLFW v2.0 things like Alt+Tab are handled (and can even be disabled with the command glfwDisable( GLFW_SYSTEM_KEYS ) .

Posting Permissions

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