How can I open a fullscreen OpenGL window on Linux?
category: general [glöplog]
xernobyl: by setting a blank mouse-cursor in your window. This can be set through the XSetWindowAttributes::cursor attribute when creating your window.
That seems to be the only way. Not having a direct "HideCursor()" function doesn't make any sense on my head. It's almost like having to draw the window borders by hand.
I've found code for it.
Finding documentation for linux programming is harder than to find a needle in an haystack. No wonder they all want public open source.
I've found code for it.
Finding documentation for linux programming is harder than to find a needle in an haystack. No wonder they all want public open source.
Quote:
It's almost like having to draw the window borders by hand.
Yeah, some people do want to code their stuff from scratch, even though there are perfectly reasonable and good alternatives ;)
Quote:
I have something similar to that now. Does your thing have time control?
Only with a sucky getTimeOfDay(...) per frame. I was using clock() before, but with ubuntu, you only have second precision with clock() !!! :(
Quote:
How do I hide the mouse?
I do it in the source I linked the page before.
... And to be complete, after the openscreen/timer/mouseHidding , the next classic question on linux coding is: "How do I do a messageBox() in one line"... If someone has an answer, I'm interested.
xernobyl, you're too stubborn to use readily available cross-platform libraries that are well documented and used by many people (thus reasonably bug-free), and then you complain that the OS documentation does not suffice? what's up, woke up in a bad mood? do you want a fullscreen window at all?
I did some basic timing functions using clock_gettime(CLOCK_REALTIME, &time); but I didn't test it yet.
I already have a fullscreen window thank you very much. :)
i'm not saying you didn't. i'm saying your complaints are hypocritical :-)
anyway, i really suggest timing on the music. i'm not sure what kind of player you use, but get one that's got precise timing (i.e. BASS on windows), and just ask that where it is as the only timing input. this means that even if for whatever reason your audio stutters at some point, your visuals will still be in sync. additionally, you don't have to deal with platform specific timing issues (which, in addition to being a pain to figure out, often have a lot lower precision than the resolution they report, to my experience)
on linux i guess some ogg player library should be pretty easy to get going. given, of course, that you're willing to use a library...
anyway, i really suggest timing on the music. i'm not sure what kind of player you use, but get one that's got precise timing (i.e. BASS on windows), and just ask that where it is as the only timing input. this means that even if for whatever reason your audio stutters at some point, your visuals will still be in sync. additionally, you don't have to deal with platform specific timing issues (which, in addition to being a pain to figure out, often have a lot lower precision than the resolution they report, to my experience)
on linux i guess some ogg player library should be pretty easy to get going. given, of course, that you're willing to use a library...
skrebbel: who needs a library, when you can just pipe /dev/rand to /dev/dsp?
kusma: that's any nosfe prod in 256 bytes or less!
Quote:
How do I hide the mouse?
Looks you do that with glfwDisable(GLFW_MOUSE_CURSOR); in that framework you were recomended but choose to ignore
Quote:
the next classic question on linux coding is: "How do I do a messageBox() in one line"
system("zenity --info --text \"Oh noes!\"");
Quote:
on linux i guess some ogg player library should be pretty easy to get going. given, of course, that you're willing to use a library...
Wasn't there a public domain OGG player code somewhere?
...while you're at it
Wasn't there a public domain PNG decoder code somewhere?
Wasn't there a public domain PNG decoder code somewhere?
libpng and google are your friends. as usual.
for information, libpng is dependant to zlib.
plus, AFAIK, the official libjpg surprinsingly can't load progressive jpg.
xD
Quote:
...while you're at it
Wasn't there a public domain PNG decoder code somewhere?
it's on the same fucking site, written by the same author, for the fucking goo- "i'm feeling lucky" -gle's sake... Oh, you were probably not really asking. But then why the question mark?
Quote:
plus, AFAIK, the official libjpg surprinsingly can't load progressive jpg.
plus, AFAIK, libjpeg sucks in every possible way imaginable to man and machine.
Then there is also SOIL library - http://www.lonesock.net/soil.html
almost every 'lib*'-named lib sucks, surprisingly.
SOIL looks nice and is PD.