Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Page 1 of 2 12 LastLast
Results 1 to 10 of 16

Thread: GLX / Fullscreen

  1. #1
    Junior Member Regular Contributor
    Join Date
    May 2000
    Location
    San Diego, CA, USA
    Posts
    110

    GLX / Fullscreen

    Hey,

    I was wondering how I can get fullscreen access for my GL programs? I'm not using GLUT, just pure X11/GLX and GL, but I'm not used to X programming in general.

    /skw|d

  2. #2
    Intern Contributor
    Join Date
    Jul 2000
    Posts
    60

    Re: GLX / Fullscreen

    I would like to know the same, unfortunately at the moment I have been really busy and unable to work on that. However, you can link your app to the root window. This will give you fullscreen I believe. Give that a try, the gears demo has a cmdline param to do that maybe try running the gears demo on the root pane first just to make sure I've not been miss lead. The problem doing this is any windows you have open will be in front of your GL proggie But it is a start, hopefully this weekend I will have some time to do some more work and that is on my list, I'll post back next week as to my progress.

  3. #3
    Junior Member Regular Contributor
    Join Date
    May 2000
    Location
    San Diego, CA, USA
    Posts
    110

    Re: GLX / Fullscreen

    I am sure there must be a way to get the dimensions of the current display and create a window that overlaps everything. Would need to be able to resize this window when we change the resolutions too. I am sure someone has already done all this and could point us to some src.

    /skw|d

  4. #4
    Intern Contributor
    Join Date
    May 2000
    Location
    St. John's, NF, Canada
    Posts
    50

    Re: GLX / Fullscreen

    Just an option for ya.

    Why not take a look at how glut does it and implement it yourself.


    Chris

  5. #5
    Junior Member Newbie
    Join Date
    Apr 2000
    Location
    New Jersey, USA
    Posts
    23

    Re: GLX / Fullscreen

    What function/option in GLUT makes you go fullscreen?

    / Patric

  6. #6
    Intern Contributor
    Join Date
    May 2000
    Location
    St. John's, NF, Canada
    Posts
    50

    Re: GLX / Fullscreen

    Not sure exactly, have never used it. It isnt specifically in glut, it is in the gameGLUT API.

    Thats the best I can remember.

    Chris

  7. #7
    Junior Member Newbie
    Join Date
    Mar 2000
    Location
    Paris,France
    Posts
    7

    Re: GLX / Fullscreen

    Hi !
    Some xlib macros exist to get a fullscreen window :
    W = DisplayWidth(display, defaultScreen);
    H = DisplayHeight(display, defaultScreen);
    Then use W and H as arguments for XCreateWindow. It does work with Gnome and Kde, dont't know for others WM.
    Note that those macros return the first dimensions defined in you XF86Config file, even if you change them afterwards using Ctrl Alt +.
    Hope this helps.

  8. #8
    Junior Member Regular Contributor
    Join Date
    May 2000
    Location
    San Diego, CA, USA
    Posts
    110

    Re: GLX / Fullscreen

    I want to be able to handle resolution changes as well. I am sure there is a template for this sort of thing somewhere.

    /skw|d

  9. #9
    Intern Contributor
    Join Date
    Jul 2000
    Posts
    60

    Re: GLX / Fullscreen

    Ok, I have looked at the Glut code, and what is done there is they turn off the decorations(the borders, menus, that stuff) and make the window the size of the screen. They then insist on making the window top window and don't allow it to be any lower, when an event is sent.

    Changing resolution, I don't know how to do that, Does anyone know wheather or not Q3 does that? In order to change the resolution you will have to send a command to the server and in general in order to change resolution the server must be restarted. So, I don't know how that can be done.

    I will try to get some code together to get fullscreen with no borders, when I do i'll give a post.

    Neil Witcomb

  10. #10
    Junior Member Regular Contributor
    Join Date
    May 2000
    Location
    San Diego, CA, USA
    Posts
    110

    Re: GLX / Fullscreen

    Yeah, I had a feeling that the window creation was done that way. It is similiar to windows where when a window gets 100% of the GDI surface it gets all the resources.

    Mode switching in X is ok, ctrl alt +/-. I had the source to it somewhere, if I get this working I'll post the code here.

    I just thought that someone would have posted this information by now as part of a GLX tutorial.. oh well.

    /skw|d

Posting Permissions

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