projects
/
gltest.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Make the shaders work on NVidia
[gltest.git]
/
glutil_gl2.cpp
diff --git
a/glutil_gl2.cpp
b/glutil_gl2.cpp
index 8e55b9311d0fd64e74fc14bd4f46c6c8ed5114ba..87d8e0cb33c2ec7f8153985e3bc08bf4cc5f3284 100644
(file)
--- a/
glutil_gl2.cpp
+++ b/
glutil_gl2.cpp
@@
-128,6
+128,8
@@
void resolveFunctionPointers(T_glGetProcAddress p_glGetProcAddress)
// shaders
static const char *vertex_shader_source =
"#version 100 \n\
// 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\
attribute vec2 position; \n\
attribute vec3 color; \n\
varying vec3 frag_color; \n\
@@
-138,6
+140,8
@@
void main() \n\
}";
static const char *fragment_shader_source =
"#version 100 \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\
varying vec3 frag_color; \n\
void main(void) \n\
{ \n\