1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-14 13:30:48 +03:00

0026665: Visualization, TKOpenGl - specify precision for integer uniforms explicitly within OpenGL ES

Use lowp for enumerations / Boolean uniforms.
Define default integer precision to highp in Fragment Shader when available.
This commit is contained in:
kgv
2015-09-09 10:29:43 +03:00
committed by bugmaster
parent 598f4391a8
commit 8a53d1c486
3 changed files with 21 additions and 13 deletions

View File

@@ -227,7 +227,9 @@ Standard_Boolean OpenGl_ShaderProgram::Initialize (const Handle(OpenGl_Context)&
#if defined(GL_ES_VERSION_2_0)
TCollection_AsciiString aPrefix (theCtx->hasHighp
? "precision highp float;\n"
: "precision mediump float;\n");
"precision highp int;\n"
: "precision mediump float;\n"
"precision mediump int;\n");
aSource = aHeader + aPrefix + aSource;
#else
aSource = aHeader + aSource;