fix build
[gltest.git] / glutil_gl2.cpp
index 68a789b661ce65d8af5cc410482729c1700938d0..87d8e0cb33c2ec7f8153985e3bc08bf4cc5f3284 100644 (file)
@@ -78,8 +78,7 @@ static T_proc resolveFunctionPointer(T_glGetProcAddress p_glGetProcAddress, cons
 {
        T_proc proc = p_glGetProcAddress(name);
        if (proc == NULL) {
-               fprintf(stderr, "Error resolvung function %s\n", name);
-               exit(1);
+               die("Error resolvung function %s\n", name);
        }
        return proc;
 }
@@ -96,8 +95,7 @@ void resolveFunctionPointers(T_glGetProcAddress p_glGetProcAddress)
        int majorVersion;
        ssm >> majorVersion;
        if (majorVersion < 2) {
-               fprintf(stderr, "Need at least GL 2.0 to function properly, but detected version %d\n", majorVersion);
-               exit(1);
+               die("Need at least GL 2.0 to function properly, but detected version %d\n", majorVersion);
        }
 #endif
        
@@ -130,6 +128,8 @@ void resolveFunctionPointers(T_glGetProcAddress p_glGetProcAddress)
 // shaders
 static const char *vertex_shader_source =
 "#version 100 \n\
+precision mediump float;\n\
+precision mediump int;\n\
 attribute vec2 position; \n\
 attribute vec3 color; \n\
 varying vec3 frag_color; \n\
@@ -140,6 +140,8 @@ void main() \n\
 }";
 static const char *fragment_shader_source =
 "#version 100 \n\
+precision mediump float;\n\
+precision mediump int;\n\
 varying vec3 frag_color; \n\
 void main(void) \n\
 { \n\