Code examples for opening windows for various purposes in very few bytes
Go to file
blackle a8ea838715 woops, forgot index.html.inc 2019-04-02 21:37:36 -04:00
Section-Header-Stripper@a4c7aea4f0 Add submodules, better make 2019-04-02 00:17:23 -04:00
vondehi@859c6c11d0 Add submodules, better make 2019-04-02 00:17:23 -04:00
.gitignore Add xlib example 2019-04-02 01:13:23 -04:00
.gitmodules Add submodules, better make 2019-04-02 00:17:23 -04:00
Makefile Remove iTime from shaders, render each only once 2019-04-02 10:05:13 -04:00
README.md Remove iTime from shaders, render each only once 2019-04-02 10:05:13 -04:00
gtk-opengl.c Remove iTime from shaders, render each only once 2019-04-02 10:05:13 -04:00
gtk-webkit.c Remove iTime from shaders, render each only once 2019-04-02 10:05:13 -04:00
index.html initialize webgl in a really shitty unoptimized way 2019-04-02 09:58:43 -04:00
index.html.inc woops, forgot index.html.inc 2019-04-02 21:37:36 -04:00
shader.frag Remove iTime from shaders, render each only once 2019-04-02 10:05:13 -04:00
shader_minifier.exe Opengl with gtk example 2019-04-02 00:43:08 -04:00
xlib-opengl.c Sizecode xlib a bit 2019-04-02 01:15:52 -04:00

README.md

Linux-OpenGL-Examples

Some code examples for opening windows for various purposes in very few bytes. The examples mostly do the same thing, the only difference being gtk-webkit uses a different shader source, and is also heavily unoptimized.

gtk-opengl - 1292 bytes

Example code for opening a glsl shader fullscreen with gtk. Closes with the standard ALT+F4 on Ubuntu. Renders the shader once on load.

gtk-webkit - 1482 bytes

Example code for opening a webgl enabled html page fullscreen with gtk and webkit. Closes with the standard ALT+F4 on Ubuntu. WebGL is used to display a shader full screen with some very unoptimized javascript. Like gtk-opengl, the shader is rendered once. Optimizing the js for size will probably take off another 100 bytes or two.

xlib-opengl - 1474 bytes

Example code for opening a glsl shader fullscreen with vanilla xlib. Like gtk-opengl and gtk-webkit, the shader is rendered once. Unlike gtk-opengl, the window must be closed with ESC. This code is based on the code for Cenotaph For Soda, a 4k gfx demo for Revision 2018. OPINION: xlib feels the most fragile of the bunch here...