From: Ralf Jung Date: Wed, 2 Oct 2013 18:06:39 +0000 (+0200) Subject: Make the shaders work on NVidia X-Git-Url: https://git.ralfj.de/gltest.git/commitdiff_plain/3e648337c136c8a8715d642857faa9e00a6db180?ds=inline;hp=7204186779e096ceab7b39f54dcf6f606062f29b Make the shaders work on NVidia --- diff --git a/glutil_gl2.cpp b/glutil_gl2.cpp index 8e55b93..87d8e0c 100644 --- 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\ +precision mediump float;\n\ +precision mediump int;\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\ +precision mediump float;\n\ +precision mediump int;\n\ varying vec3 frag_color; \n\ void main(void) \n\ { \n\