pouët.net

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.
added on the 2009-02-16 14:36:43 by kusma kusma
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.
added on the 2009-02-16 15:34:26 by xernobyl xernobyl
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 ;)
added on the 2009-02-16 15:41:56 by Preacher Preacher
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.
added on the 2009-02-16 15:53:20 by krabob krabob
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?
added on the 2009-02-16 16:01:50 by skrebbel skrebbel
I did some basic timing functions using clock_gettime(CLOCK_REALTIME, &time); but I didn't test it yet.
added on the 2009-02-16 16:03:06 by xernobyl xernobyl
I already have a fullscreen window thank you very much. :)
added on the 2009-02-16 16:03:57 by xernobyl xernobyl
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...
added on the 2009-02-16 16:11:01 by skrebbel skrebbel
skrebbel: who needs a library, when you can just pipe /dev/rand to /dev/dsp?
added on the 2009-02-16 16:59:39 by kusma kusma
kusma: that's any nosfe prod in 256 bytes or less!
added on the 2009-02-16 17:05:54 by sagacity sagacity
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
added on the 2009-02-16 17:09:32 by hollowman hollowman
Quote:
the next classic question on linux coding is: "How do I do a messageBox() in one line"

system("zenity --info --text \"Oh noes!\"");
added on the 2009-02-17 16:06:49 by KeyJ KeyJ
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?
added on the 2009-02-17 16:18:21 by LiraNuna LiraNuna
...while you're at it

Wasn't there a public domain PNG decoder code somewhere?
added on the 2009-02-19 14:14:12 by xernobyl xernobyl
libpng and google are your friends. as usual.
added on the 2009-02-19 14:15:37 by raer raer
for information, libpng is dependant to zlib.
added on the 2009-02-19 14:23:29 by krabob krabob
xernobyl: There's LodePNG (zlib license) for PNG and TinyJPEG for JPEG. (However, TinyJPEG lacks a chroma post-filter, so visual quality isn't optimal. But that's only really noticeable for images that should have been encoded with PNG anyway ;)
added on the 2009-02-19 14:45:38 by KeyJ KeyJ
plus, AFAIK, the official libjpg surprinsingly can't load progressive jpg.
added on the 2009-02-19 17:02:15 by krabob krabob
xD
added on the 2009-02-20 15:05:51 by xernobyl xernobyl
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.
added on the 2009-02-20 16:40:04 by blala blala
Then there is also SOIL library - http://www.lonesock.net/soil.html
added on the 2009-02-20 17:13:58 by snoutmate snoutmate
almost every 'lib*'-named lib sucks, surprisingly.
added on the 2009-02-20 18:40:43 by superplek superplek
SOIL looks nice and is PD.
added on the 2009-02-20 18:44:58 by raer raer

login