Code examples for opening windows for various purposes in very few bytes
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
blackle a8ea838715 woops, forgot index.html.inc 3 years ago
Section-Header-Stripper@a4c7aea4f0 Add submodules, better make 3 years ago
vondehi@859c6c11d0 Add submodules, better make 3 years ago
.gitignore Add xlib example 3 years ago
.gitmodules Add submodules, better make 3 years ago
Makefile Remove iTime from shaders, render each only once 3 years ago
README.md Remove iTime from shaders, render each only once 3 years ago
gtk-opengl.c Remove iTime from shaders, render each only once 3 years ago
gtk-webkit.c Remove iTime from shaders, render each only once 3 years ago
index.html initialize webgl in a really shitty unoptimized way 3 years ago
index.html.inc woops, forgot index.html.inc 3 years ago
shader.frag Remove iTime from shaders, render each only once 3 years ago
shader_minifier.exe Opengl with gtk example 3 years ago
xlib-opengl.c Sizecode xlib a bit 3 years ago

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...