Skip to content

Instantly share code, notes, and snippets.

@jfuerth
jfuerth / egl_bar.c
Last active May 16, 2025 11:24
Self-contained example of an EGL + X11 OpenGL ES 2.0 rectangle moving across the screen
// egl_bar.c - self-contained example of a vertical bar moving across the screen.
// compile with gcc -Wall -O0 -g -o egl_bar egl_bar.c log.c -lX11 -lEGL -lGLESv2 -lm
#include <stdio.h>
#include <math.h>
#include <malloc.h>
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
@kanru
kanru / Makefile
Created September 28, 2012 11:08
X11 EGL
all: egl
egl: egl.cpp
g++ -lX11 -lEGL -lGLESv2 egl.cpp -o egl