42 lines
697 B
C
42 lines
697 B
C
|
#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);
|
||
|
}
|