initial version

This commit is contained in:
Florian Stecker
2025-12-07 19:04:34 -05:00
commit 04a707b4ed
29 changed files with 1021 additions and 0 deletions

34
gl3.h Normal file
View File

@@ -0,0 +1,34 @@
#ifndef GL3_H
#define GL3_H
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdbool.h>
#include <unistd.h>
#include <X11/Xlib.h>
#include <X11/Xutil.h>
#include <GL/glew.h>
#include <GL/gl.h>
#include <GL/glx.h>
typedef struct {
Display *display;
Window win;
Colormap cmap;
GLXContext ctx;
Atom wm_protocols;
Atom wm_delete_window;
} GLInfo;
bool initGL(int screen, int mask, GLInfo *glinfo);
void destroyGL(GLInfo *glinfo);
bool initShaders(const char *vertexShaderSrc, const char *fragmentShaderSrc, GLuint *program);
static Bool alwaysTruePredicate(Display *display, XEvent *event, XPointer arg)
{
return true;
}
#endif