Document code, and clean up

This commit is contained in:
PedroEdiaz
2024-10-21 16:50:49 -06:00
parent 6e54aa9fea
commit 17e1cf8804
13 changed files with 245 additions and 193 deletions

View File

@@ -1,15 +1,17 @@
#include "main.h"
#include <GL/gl.h>
#include <GL/glew.h>
void set_clean_color_context( unsigned char r, unsigned char g, unsigned char b )
{
glEnable( GL_DEPTH_TEST );
glEnable( GL_CULL_FACE );
glCullFace( GL_BACK );
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 );