aboutsummaryrefslogtreecommitdiff
path: root/samples/OpenGL/strand_illumination/strand_illumination.c
diff options
context:
space:
mode:
authorWolfgang Draxinger <Wolfgang.Draxinger@draxit.de>2014-10-07 03:38:55 +0200
committerWolfgang Draxinger <Wolfgang.Draxinger@draxit.de>2014-10-07 03:38:55 +0200
commit1e387fc8eee4925616967edd26de0ee416dbce3f (patch)
treef6be0b844c724d6c4891f325912bb4f3f2f26c4b /samples/OpenGL/strand_illumination/strand_illumination.c
parent3ce7214d2300e2769667649625d160dcdc01499c (diff)
parentb62b7bf28ec0069e6f460fa0f07b64a0dba72557 (diff)
downloadcodesamples-1e387fc8eee4925616967edd26de0ee416dbce3f.tar.gz
codesamples-1e387fc8eee4925616967edd26de0ee416dbce3f.tar.bz2
Merge branch 'master' of git://github.com/datenwolf/codesamples
Diffstat (limited to 'samples/OpenGL/strand_illumination/strand_illumination.c')
-rw-r--r--samples/OpenGL/strand_illumination/strand_illumination.c56
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;
+}
+