Files
billiards_gl/gl3.h
Florian Stecker 04a707b4ed initial version
2025-12-07 19:04:34 -05:00

35 lines
664 B
C

#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