4k GL framework for Linux
category: code [glöplog]
Maybe it should be a good idea to have a look at X upper level functions like XtAppInitialize() or even XtDisplayInitialize() ( XtAppInitialize uses XtDisplayInitialize) , that are very ancient functions and automatically use the DISPLAY env variable to set the modes, and can take argc,argv command line args to parse the standard "-display machine:screen" argument, which you can even use to redirect the rendering to distant screen server and screens. (note: Linux/unix OpenGLs are actually defined as a servers themselves.) I think glut use them, because glut manages the display arg the same way.( I 've never found the time to test a startup myself with that).
If i'm correct some classic opengl screensavers ans example out there must use these ones to open their screen.
User documentation for the standard -display arg, JSAOYK
If i'm correct some classic opengl screensavers ans example out there must use these ones to open their screen.
User documentation for the standard -display arg, JSAOYK
O o
/¯/___________________________ _____/
|BLAAAAAAAAAAAAAAAAAAAAAARGHH
\_\¯¯¯¯¯¯¯¯¯----¯¯¯¯¯¯ ¯¯¯¯¯\
/¯/___________________________ _____/
|BLAAAAAAAAAAAAAAAAAAAAAARGHH
\_\¯¯¯¯¯¯¯¯¯----¯¯¯¯¯¯ ¯¯¯¯¯\
This thread is *very* interesting. iq please email me if possible. xteraco@gmail.com
I've got a few xlib manuals and things laying around and I wouldn't mind looking at this with you.
I've got a few xlib manuals and things laying around and I wouldn't mind looking at this with you.
Here's a small test that sends a connection request to the server via and reads the response (only a part of it) via an unix socket. If everything goes right, it'll write "The X.Org Foundation" (the vendor name) on the standard output. I get a wonderful 956 bytes binary with -nostdlib -static -s (optimisations produce fucked up code).
My experiment from nine years ago (306-byte binary that scrolls a xor texture in a window) doesn't seem to work anymore with a 32bpp xorg server.
I can now open a window. The only problem is that this code crash (and not even compile for the noasm version) on x86_64. The call convention changed also. The "syscall" instruction is used instead of the soft interruption (int $0x80). And SYS_socketcall is replaced by the corresponding socket functions (SYS_connect etc...).