initial version
This commit is contained in:
34
gl3.h
Normal file
34
gl3.h
Normal 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
|
||||
Reference in New Issue
Block a user