Files
manigraph/src/context.c
2024-10-24 11:21:07 -06:00

14 lines
362 B
C

#include "main.h"
#include <GL/glew.h>
void set_clean_color_context(unsigned char r, unsigned char g, unsigned char b)
{
glEnable(GL_DEPTH_TEST);
glClearColor((float)r / 0xff, (float)g / 0xff, (float)b / 0xff, 1.0);
}
int init_context(void) { return glewInit() == GLEW_OK; }
void clean_context(void) { glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); }