{
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;
}
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
// 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\
}";
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\