From 3e648337c136c8a8715d642857faa9e00a6db180 Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Wed, 2 Oct 2013 20:06:39 +0200 Subject: [PATCH] Make the shaders work on NVidia --- glutil_gl2.cpp | 4 ++++ 1 file changed, 4 insertions(+) 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\ -- 2.30.2