From 0b8fe2535084918d4338c022f90fd9f38be3e252 Mon Sep 17 00:00:00 2001 From: Hajime Hoshi Date: Fri, 17 Jun 2016 04:13:46 +0900 Subject: [PATCH] opengl: Implement GlslHighpSupported for iOS --- audio/internal/driver/driver_ios.go | 2 ++ internal/graphics/opengl/context_mobile.go | 5 +++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/audio/internal/driver/driver_ios.go b/audio/internal/driver/driver_ios.go index ad7444992..302be9839 100644 --- a/audio/internal/driver/driver_ios.go +++ b/audio/internal/driver/driver_ios.go @@ -12,6 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. +// TODO: Can we unify this into driver_openal.go? + // +build ios darwin,arm darwin,arm64 package driver diff --git a/internal/graphics/opengl/context_mobile.go b/internal/graphics/opengl/context_mobile.go index 8c1d68808..c670a1034 100644 --- a/internal/graphics/opengl/context_mobile.go +++ b/internal/graphics/opengl/context_mobile.go @@ -256,8 +256,9 @@ func (c *Context) DeleteShader(s Shader) { } func (c *Context) GlslHighpSupported() bool { - // TODO: Fix this - return false + gl := c.gl + _, _, precision := gl.GetShaderPrecisionFormat(mgl.FRAGMENT_SHADER, mgl.HIGH_FLOAT) + return precision != 0 } func (c *Context) NewProgram(shaders []Shader) (Program, error) {