From 4a628d1c2c2c268ef896a25ce9c742817c6d706e Mon Sep 17 00:00:00 2001 From: Elias Naur Date: Wed, 11 Dec 2019 15:12:57 +0100 Subject: [PATCH] app/internal/gpu: re-add check for GL_EXT_color_buffer_half_float As noted in #49, GL_EXT_color_buffer_half_float is required for GL_OES_texture_half_float to be useful for FBOs. Updates #49 Signed-off-by: Elias Naur --- app/internal/gpu/context.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/internal/gpu/context.go b/app/internal/gpu/context.go index c5e10cd8..dc780e7d 100644 --- a/app/internal/gpu/context.go +++ b/app/internal/gpu/context.go @@ -66,7 +66,7 @@ func floatTripleFor(ctx *context, ver [2]int, exts []string) (textureTriple, err if ver[0] >= 3 { triples = append(triples, textureTriple{gl.R16F, gl.Enum(gl.RED), gl.Enum(gl.HALF_FLOAT)}) } - if hasExtension(exts, "GL_OES_texture_half_float") { + if hasExtension(exts, "GL_OES_texture_half_float") && hasExtension(exts, "GL_EXT_color_buffer_half_float") { // Try single channel. triples = append(triples, textureTriple{gl.LUMINANCE, gl.Enum(gl.LUMINANCE), gl.Enum(gl.HALF_FLOAT_OES)}) // Fallback to 4 channels.