shadermeh/shadermeh.h

48 lines
873 B
C

#ifndef SHADERMEH_H
#define SHADERMEH_H
#include <X11/X.h>
#include <X11/Xlib.h>
#include <X11/Xutil.h>
#include <X11/Xresource.h>
#include <GL/glew.h>
#include <GL/gl.h>
#include <GL/glx.h>
#include <stdbool.h>
#include <string.h>
#include <stdlib.h>
#include <getopt.h>
#include <unistd.h>
#include <stdio.h>
#include <errno.h>
#include <time.h>
typedef struct {
Window wnd;
GLXContext gl;
} window;
window *window_create(unsigned int width, unsigned int height,
const char *caption);
void window_make_current(window *wnd);
void window_swap_buffers(window *wnd);
void window_set_vsync(window *wnd, int enable);
void window_destroy(window *wnd);
int window_handle_events(void);
GLuint shader_program_load(const char *fsh);
int shader_program_get_build_status(GLuint prog);
void shader_program_print_info_log(GLuint prog);
#endif /* SHADERMEH_H */