Results 1 to 8 of 8

Thread: Fullscreen Question

  1. #1
    Member Contributor
    Join Date
    Mar 2006
    Location
    chicago
    Posts
    72

    Fullscreen Question

    I need to find a way to render fullscreen. Can someone please help?
    zadeh

  2. #2
    Senior Member OpenGL Pro k_szczech's Avatar
    Join Date
    Feb 2006
    Location
    Poland
    Posts
    1,107

    Re: Fullscreen Question

    Do you use your own procedures for managing application window?
    You need to create window with proper style (without border and title bar) - preferably WS_POPUP. You need to place this window at (0,0) when you create it and then change desktop resolution / refresh rate / color depth. You can do this by calling ChangeDisplaySettings function.
    If you want things to be done properly you should start with EnumDisplayDevices to find proper device, then use EnumDisplaySettings to find all available resolutions, color depths and refresh rates.

  3. #3
    Senior Member OpenGL Pro Zengar's Avatar
    Join Date
    Sep 2001
    Location
    Germany
    Posts
    1,931

    Re: Fullscreen Question

    I see your game is progressing
    Did you solve your texture/performance problem? Are you still doing it in your original way?

    To your question: if I am not mistaken, you use GLUT, right? In this case just look through the specs, there is something like GLUT_GAME_MODE or similar (words game and mode where present . Sorry that I don't know any details, never used GLUT myself...

  4. #4
    Member Contributor
    Join Date
    Mar 2006
    Location
    chicago
    Posts
    72

    Re: Fullscreen Question

    Hello Zengar. Indeed, I solved both performance issues. I admit my solutions are unorthodox. The scene that you see above (not including the charachter) is just one big image that I made in the Windows Paint Program, loaded, and applied to a quad only once. The alternative, I'm sure you know, was to define a large number of quads and apply the approriate textures to them every time through the loop. Obviously, the latter method is more time consuming, takes up more code, and does not result in more FPS. The, second method also doesn't really involve any additional OpenGL functions important to learn (I'm already familiar with display lists). With all this, I decided to stay away from it (I should also note that I don't plan to manipulate anything in the original image either).
    Now the charachter that you see was defined with the GL_LINE_STRIP command, piece by piece. As you may recall, this charachter is rendered to the FRONT buffer (I did this so I can prevent swapping buffers, which would effectively clear my entire scene - remember the scene is only loaded/rendered once). With my old intel, on-board video chip, this charachter would flicker rapidly in the front buffer. When I got a new video card (GEFORCE 7600 PCIE) as a gift, I was somewhat surprised to see this flickering problem went away (although this was one of my initial suspicions as to the possible problem). So as far as I can predict, I am all set to really start working on the game. I should be able to dedicate Sundays to it, because I am busy working on my Masters degree. By the way the game will be freeware, it will feature 300-400 explorable screens, turn based battles with Stat system, and many challenging puzzles. I am aiming for an old-school type of feel to it, similar to the early Final Fantasy/Zelda/Dragon Quest type games.
    The animated charachter is now capable of moving from right to left, up and down quite smoothly. My next step is to implement an array for collision detection, and fill it up with the coordinates defining uncrossable planes.

    Soon after I started this topic, I found out about the glutENTER_GAME_MODE command and I plan on using it.

    zadeh

  5. #5
    Senior Member OpenGL Pro k_szczech's Avatar
    Join Date
    Feb 2006
    Location
    Poland
    Posts
    1,107

    Re: Fullscreen Question

    About that flickering - see if you have vsync enabled - if yes, then probably you just get away with drawing character when the frame is not currently displayed on monitor. If you turn off vsync, then you probably end up in flickering again.

  6. #6
    Member Contributor
    Join Date
    Mar 2006
    Location
    chicago
    Posts
    72

    Re: Fullscreen Question

    Yeah, I've already experimented with the vsync, but it did not appear to have an effect on the flickering. Thank you for the suggestion.
    zadeh

  7. #7
    Junior Member Newbie
    Join Date
    Jul 2011
    Posts
    17

    Re: Fullscreen Question

    Flickering usually happens then using GLUT_SINGLE + glFlush(), use GLUT_DOUBLE + glutSwapBuffers().

  8. #8
    Member Contributor
    Join Date
    Mar 2006
    Location
    chicago
    Posts
    72

    Re: Fullscreen Question

    I'm in double_buffer mode, and switching between front and back with swap_buffer command.
    zadeh

Similar Threads

  1. Fullscreen with X11?
    By Asteroth in forum OpenGL: Linux
    Replies: 3
    Last Post: 12-02-2008, 07:44 AM
  2. set fullscreen
    By amando in forum OpenGL: Windows
    Replies: 2
    Last Post: 12-19-2004, 01:09 PM
  3. fullscreen question
    By in forum OpenGL: Basic Coding
    Replies: 3
    Last Post: 11-07-2004, 05:25 PM
  4. fullscreen
    By helda in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 01-03-2003, 01:52 PM
  5. Switching to fullscreen, aesthetic question
    By Jeramie in forum OpenGL: Advanced Coding
    Replies: 1
    Last Post: 02-27-2001, 07:04 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