From cc39cdc8f51de335dc06e3de6f133f0f2d0fda6e Mon Sep 17 00:00:00 2001 From: Hajime Hoshi Date: Fri, 1 Jul 2016 02:40:53 +0900 Subject: [PATCH] opengl: Bug fix: glGetShaderPrecisionFormat returns wrong values on emulators (#239) --- internal/graphics/opengl/context_mobile.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/internal/graphics/opengl/context_mobile.go b/internal/graphics/opengl/context_mobile.go index 3d782396f..7b6261185 100644 --- a/internal/graphics/opengl/context_mobile.go +++ b/internal/graphics/opengl/context_mobile.go @@ -260,6 +260,11 @@ func (c *Context) DeleteShader(s Shader) { func (c *Context) GlslHighpSupported() bool { gl := c.gl _, _, precision := gl.GetShaderPrecisionFormat(mgl.FRAGMENT_SHADER, mgl.HIGH_FLOAT) + // On Android emulators, precision might be a wrong value (#239). + // TODO: If possible, check if this is running on an emulator. + if 64 <= precision { + return false + } return precision != 0 }