diff options
author | Wolfgang Draxinger <Wolfgang.Draxinger@draxit.de> | 2013-05-12 02:05:08 +0200 |
---|---|---|
committer | Wolfgang Draxinger <Wolfgang.Draxinger@draxit.de> | 2013-05-12 02:05:08 +0200 |
commit | 2442c23c78fbe205cbebbe2f26d8a20eecbb1347 (patch) | |
tree | 274d71054621fadd177d7d0c854d19ef00399b50 /samples/OpenGL/strand_illumination/strand_illumination.c | |
parent | 623fc8c73de35bef0785f09bae8a3f607f8ed087 (diff) | |
download | codesamples-2442c23c78fbe205cbebbe2f26d8a20eecbb1347.tar.gz codesamples-2442c23c78fbe205cbebbe2f26d8a20eecbb1347.tar.bz2 |
commit of new sample 'frustum'
Diffstat (limited to 'samples/OpenGL/strand_illumination/strand_illumination.c')
-rw-r--r-- | samples/OpenGL/strand_illumination/strand_illumination.c | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/samples/OpenGL/strand_illumination/strand_illumination.c b/samples/OpenGL/strand_illumination/strand_illumination.c new file mode 100644 index 0000000..08ca7fa --- /dev/null +++ b/samples/OpenGL/strand_illumination/strand_illumination.c @@ -0,0 +1,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; +} + |