From 53e2d16e5c0c49c147c0d2a7a3541071eada37fc Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Wed, 12 Nov 2014 02:01:25 +0200 Subject: [PATCH] Precision must always be specified for OpenGL ES --- source/programbuilder.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/source/programbuilder.cpp b/source/programbuilder.cpp index dc4bd19c..002e3a27 100644 --- a/source/programbuilder.cpp +++ b/source/programbuilder.cpp @@ -385,7 +385,6 @@ string ProgramBuilder::create_source(const list &variables, Va { if(use_blocks) source += "#version 300 es\n"; - source += "precision mediump float;\n"; } else { @@ -395,6 +394,9 @@ string ProgramBuilder::create_source(const list &variables, Va } } + if(get_gl_api()==OPENGL_ES2) + source += "precision mediump float;\n"; + set declared_types; set uniform_blocks; for(list::const_iterator i=variables.begin(); i!=variables.end(); ++i) -- 2.45.2