summaryrefslogtreecommitdiff
path: root/progs/util
diff options
context:
space:
mode:
authorKeith Whitwell <keithw@vmware.com>2009-06-29 16:07:14 +0100
committerKeith Whitwell <keithw@vmware.com>2009-06-29 16:07:14 +0100
commit9014f475ff6720b694ba28906ebfe7e77795b173 (patch)
treeb1f8312d13a705d384377e2558ae218c7605716a /progs/util
parentb799af91d5ffbee1481161fec29eb4c92b161272 (diff)
progs/util: make sure function pointers are initialized
Call Init() from CompileShaderFile, was previously only called for the Text version of this function.
Diffstat (limited to 'progs/util')
-rw-r--r--progs/util/shaderutil.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/progs/util/shaderutil.c b/progs/util/shaderutil.c
index 2f1c4e38b3..5cef84eb49 100644
--- a/progs/util/shaderutil.c
+++ b/progs/util/shaderutil.c
@@ -9,6 +9,7 @@
#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
+#include <GL/glew.h>
#include <GL/glut.h>
#include "extfuncs.h"
#include "shaderutil.h"
@@ -78,8 +79,12 @@ CompileShaderFile(GLenum shaderType, const char *filename)
int n;
char *buffer = (char*) malloc(max);
GLuint shader;
+ FILE *f;
- FILE *f = fopen(filename, "r");
+ Init();
+
+
+ f = fopen(filename, "r");
if (!f) {
fprintf(stderr, "Unable to open shader file %s\n", filename);
return 0;