From 2442c23c78fbe205cbebbe2f26d8a20eecbb1347 Mon Sep 17 00:00:00 2001 From: Wolfgang Draxinger Date: Sun, 12 May 2013 02:05:08 +0200 Subject: commit of new sample 'frustum' --- samples/OpenGL/strand_illumination/.gitignore | 1 + samples/OpenGL/strand_illumination/CMakeLists.txt | 0 samples/OpenGL/strand_illumination/strand.fs.glsl | 0 samples/OpenGL/strand_illumination/strand.vs.glsl | 0 .../strand_illumination/strand_illumination.c | 56 ++++++++++++++++++++++ 5 files changed, 57 insertions(+) create mode 100644 samples/OpenGL/strand_illumination/.gitignore create mode 100644 samples/OpenGL/strand_illumination/CMakeLists.txt create mode 100644 samples/OpenGL/strand_illumination/strand.fs.glsl create mode 100644 samples/OpenGL/strand_illumination/strand.vs.glsl create mode 100644 samples/OpenGL/strand_illumination/strand_illumination.c (limited to 'samples/OpenGL/strand_illumination') diff --git a/samples/OpenGL/strand_illumination/.gitignore b/samples/OpenGL/strand_illumination/.gitignore new file mode 100644 index 0000000..a007fea --- /dev/null +++ b/samples/OpenGL/strand_illumination/.gitignore @@ -0,0 +1 @@ +build/* diff --git a/samples/OpenGL/strand_illumination/CMakeLists.txt b/samples/OpenGL/strand_illumination/CMakeLists.txt new file mode 100644 index 0000000..e69de29 diff --git a/samples/OpenGL/strand_illumination/strand.fs.glsl b/samples/OpenGL/strand_illumination/strand.fs.glsl new file mode 100644 index 0000000..e69de29 diff --git a/samples/OpenGL/strand_illumination/strand.vs.glsl b/samples/OpenGL/strand_illumination/strand.vs.glsl new file mode 100644 index 0000000..e69de29 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 +#include +#include +#include + +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; +} + -- cgit v1.2.3