shadermeh/shadermeh.h
David Oberhollenzer 13e1363e0b Add license boilerplate
Signed-off-by: David Oberhollenzer <goliath@infraroot.at>
2022-07-17 15:58:53 +02:00

58 lines
1.1 KiB
C

/* SPDX-License-Identifier: ISC */
/*
* shadermeh.h
*
* Copyright (C) 2022 David Oberhollenzer <goliath@infraroot.at>
*/
#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;
bool visible;
} 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);
void window_show(window *wnd);
void window_hide(window *wnd);
bool 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 */