PDA

View Full Version : Fullscreen with X11?



Asteroth
11-30-2008, 07:40 AM
Hello.

I want to create a simple class that manages a window, just that (I don't like to use SDL or other libraries that add lots of other unneeded things). I use X11 in Linux to create the window, and all works well (OpenGL, input, resize, move, etc.) except the fullscreen mode.
Does anyone know how to create the window without borders and change the resolution?

trinitrotoluene
11-30-2008, 09:07 AM
Check the tutorial #1 at Nehe (http://nehe.gamedev.net/data/lessons/lesson.asp?lesson=01). Download the Linux/GLX source code at the bottom of the page.

Asteroth
11-30-2008, 11:11 AM
Thanks, the Linux/GLX version of the tutorial is what i need, it works :). At the beginning it gave me lots of errors, I had to install XVidMode extension library and manually link a file. I hope the compiled version will work on computers without XVidMode extension installed.

Dark Photon
12-02-2008, 07:44 AM
Thanks, the Linux/GLX version of the tutorial is what i need, it works :). At the beginning it gave me lots of errors, I had to install XVidMode extension library and manually link a file. I hope the compiled version will work on computers without XVidMode extension installed.
You don't need to use XVidMode for that. It's not necessary. You can request position and size via XSetWMProperties, and turn off the window border using XChangeProperty of _MOTIF_WM_HINTS. Just google it. the glutFullScreen implementation will have it. If you want some code, PM me.

Of course if your app will only run on Linux, XVidMode is probably just fine.