-
Junior Member
Regular Contributor
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
-
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.
-
Junior Member
Regular Contributor
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
-
Re: GLX / Fullscreen
Just an option for ya.
Why not take a look at how glut does it and implement it yourself.
Chris
-
Re: GLX / Fullscreen
What function/option in GLUT makes you go fullscreen?
/ Patric
-
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
-
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.
-
Junior Member
Regular Contributor
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
-
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
-
Junior Member
Regular Contributor
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
-
Forum Rules