This repository has been archived on 2023-05-27. You can view files and clone it, but cannot push or open issues or pull requests.
api8/src/manif.c

42 lines
697 B
C
Raw Normal View History

2023-05-08 09:07:48 +02:00
#include "../includes/animations.h"
static GLuint _pId = 0;
static void init(void);
static void draw(void);
void manif(int state) {
switch (state) {
case GL4DH_INIT:
init();
break;
case GL4DH_DRAW:
draw();
break;
default:
break;
}
}
static void init(void) {
_pId = gl4duCreateProgram("<vs>shaders/lights.vs", "<fs>shaders/lights.fs",
NULL);
gl4duGenMatrix(GL_FLOAT, "proj");
gl4duGenMatrix(GL_FLOAT, "mod");
gl4duGenMatrix(GL_FLOAT, "view");
glEnable(GL_DEPTH_TEST);
}
static void draw(void) {
glClearColor(0.0f, 0.0f, 0.0f, 1.0f);
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
/* */
glUseProgram(0);
}