aboutsummaryrefslogtreecommitdiff
path: root/samples/OpenGL/strand_illumination/strand_illumination.c
blob: 08ca7fab6876cbb49715e0a3d06fc52018aef462 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#include <GL/glew.h>
#include <GL/glut.h>
#include <GLT/multierror.h>
#include <GLT/shaderloader.h>

typedef enum {
	si_NoError = 0,
	si_ResourceNotFound = 1,
} si_Error_t;

struct {
	GLuint prog;
	GLuint vs;
	GLuint fs;

	GLuint a_position;
	GLuint a_direction;

	GLuint u_mv;
	GLuint u_normal:
	GLuint u_proj;

	GLuint u_lightpos;
} strandshader;

si_Error_t loadStrandShader(void)
{
}

si_Error_t loadGLresources(void)
{
	loadStrandShader();
}

void display(void)
{
}

int main(int argc, char argv[])
{
	si_Error_t err = si_NoError;

	glutInit(&argc, argv);
	glutInitDisplayMode(GLUT_RGBA | GLUT_DEPTH | GLUT_DOUBLE);
	glutCreateWindow("Illuminated Strands");
	glutDisplayFunc(display);

	if( (err = loadGLResources()) != si_NoError ) {
		return -err;
	}

	glutMainLoop();
	
	return 0;
}