Results 1 to 5 of 5

Thread: Changing resolution

  1. #1
    Member Contributor
    Join Date
    Feb 2000
    Location
    Stafford, UK
    Posts
    60

    Changing resolution

    Hello all,

    How do I change the desktop resoltion in glut? I need to change the resolution (say to 800 x 600) and then go into full screen mode.

    I know how to create a window of any size and I also know how to go into full screen mode.

    Hope you can help

    David

  2. #2
    Senior Member Frequent Contributor
    Join Date
    Feb 2000
    Location
    London
    Posts
    503

    Re: Changing resolution

    You can't do this in GLUT. You'll need to use the Win32 API and call ChangeDisplaySettings.

  3. #3
    Member Contributor
    Join Date
    Feb 2000
    Location
    Stafford, UK
    Posts
    60

    Re: Changing resolution

    Thanks, that seems to work.

    Using ChangeDisplaySettings in Glut does work but are there any issues with this that I need to be aware of? It works on my machine (Win98 RivaTNT), would this work in Windows NT, or are there any compatability problems between Glut and Win32 API?

    Cheers

    David

  4. #4
    Senior Member OpenGL Guru Humus's Avatar
    Join Date
    Mar 2000
    Location
    Stockholm, Sweden
    Posts
    2,342

    Re: Changing resolution

    Sure it does work with glut, but it's not a part of glut or OpenGL, so it'll make your code less portable.

  5. #5
    Senior Member OpenGL Pro
    Join Date
    Dec 2007
    Posts
    1,077

    Re: Changing resolution

    Don't know for sure (I think it should work on all Win32 platforms) but these portability questions are mostly well answered in the online help of my MSDN copy.

    BTW: WinNT and Win98 have multi-screen support, I think. But the ChangeDisplaySettings code should work as well, at least it does for me.

    Oh and why does EnumDisplaySettings sometimes return more or less valid graphic modes?

Similar Threads

  1. Changing resolution
    By in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 01-28-2006, 10:08 AM
  2. Changing Screen Resolution
    By SNX in forum OpenGL: Linux
    Replies: 6
    Last Post: 05-19-2005, 03:58 AM
  3. Changing Resolution
    By Andrew Jameson in forum OpenGL: Advanced Coding
    Replies: 1
    Last Post: 04-30-2003, 10:21 AM
  4. changing screen resolution
    By Julien Cayzac in forum OpenGL: Linux
    Replies: 0
    Last Post: 12-09-2001, 04:00 AM
  5. Changing resolution
    By in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 06-08-2000, 09:01 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean