From: Mikko Rasa Date: Wed, 12 Nov 2014 00:01:25 +0000 (+0200) Subject: Precision must always be specified for OpenGL ES X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=53e2d16e5c0c49c147c0d2a7a3541071eada37fc;p=libs%2Fgl.git Precision must always be specified for OpenGL ES --- 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)