Mesa (mesa_7_5_branch): progs/util: make sure function pointers are initialized
Keith Whitwell
keithw at kemper.freedesktop.org
Thu Jul 2 12:31:52 UTC 2009
Module: Mesa
Branch: mesa_7_5_branch
Commit: 9014f475ff6720b694ba28906ebfe7e77795b173
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=9014f475ff6720b694ba28906ebfe7e77795b173
Author: Keith Whitwell <keithw at vmware.com>
Date: Mon Jun 29 16:07:14 2009 +0100
progs/util: make sure function pointers are initialized
Call Init() from CompileShaderFile, was previously only called for the
Text version of this function.
---
progs/util/shaderutil.c | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/progs/util/shaderutil.c b/progs/util/shaderutil.c
index 2f1c4e3..5cef84e 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;
More information about the mesa-commit
mailing list