Code examples for opening windows for various purposes in very few bytes
Go to file
blackle fc598a3404 Add xlib example 2019-04-02 01:13:23 -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 Add xlib example 2019-04-02 01:13:23 -04:00
README.md Add xlib example 2019-04-02 01:13:23 -04:00
gtk-opengl.c Opengl with gtk example 2019-04-02 00:43:08 -04:00
gtk-webkit.c Add makefile/example cde for webkit and gtk 2019-04-02 00:11:27 -04:00
shader.frag Opengl with gtk example 2019-04-02 00:43:08 -04:00
shader_minifier.exe Opengl with gtk example 2019-04-02 00:43:08 -04:00
xlib-opengl.c Add xlib example 2019-04-02 01:13:23 -04:00

README.md

Linux-OpenGL-Examples

Some code examples for opening windows for various purposes in very few bytes. Unfortunately each example does its own thing, so comparing the sizes is an apple to oranges thing.

gtk-opengl - 1585 bytes

Example code for opening a glsl shader fullscreen with gtk. Closes with the standard ALT+F4 on Ubuntu. Shaders get passed an iTime uniform in seconds. App closes automatically after 10 seconds.

gtk-webkit - 1074 bytes

Example code for opening an html page fullscreen with gtk. Closes with the standard ALT+F4 on Ubuntu. WebGL is enabled however is not used in the example. Testing with webkit gtk has found that most(?) shadertoy shaders seem to work. It has yet to be seen if initializing a shader in javascript takes fewer bytes than with gtk's opengl code.

xlib-opengl

Example code for opening a glsl shader fullscreen with vanilla xlib. Unlike gtk-opengl, this does not pass in an iTime or render the shader more than once, and also must be closed with ESC. This code is based on the code for Cenotaph For Soda, a 4k gfx demo for Revision 2018