mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 20:28:04 +02:00
progs/util: make sure function pointers are initialized
Call Init() from CompileShaderFile, was previously only called for the Text version of this function.
This commit is contained in:
parent
6e09c1fd08
commit
14a2b5445a
1 changed files with 6 additions and 1 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue