From 45289dea095cf4f1ad137dcf97c691ea503f7619 Mon Sep 17 00:00:00 2001 From: SamGondelman Date: Mon, 21 May 2018 14:27:18 -0700 Subject: [PATCH] on mac, render unsupported bptc textures (skyboxes) as uncompressed --- libraries/gpu-gl/src/gpu/gl41/GL41BackendTexture.cpp | 4 ++++ libraries/gpu-gl/src/gpu/gl45/GL45BackendTexture.cpp | 2 ++ 2 files changed, 6 insertions(+) diff --git a/libraries/gpu-gl/src/gpu/gl41/GL41BackendTexture.cpp b/libraries/gpu-gl/src/gpu/gl41/GL41BackendTexture.cpp index 503e1df922..a255cc5878 100644 --- a/libraries/gpu-gl/src/gpu/gl41/GL41BackendTexture.cpp +++ b/libraries/gpu-gl/src/gpu/gl41/GL41BackendTexture.cpp @@ -31,6 +31,10 @@ bool GL41Backend::supportedTextureFormat(const gpu::Element& format) { case gpu::Semantic::COMPRESSED_EAC_RED_SIGNED: case gpu::Semantic::COMPRESSED_EAC_XY: case gpu::Semantic::COMPRESSED_EAC_XY_SIGNED: + // The ARB_texture_compression_bptc extension is not supported on 4.1 + // See https://www.g-truc.net/doc/OpenGL%204%20Hardware%20Matrix.pdf + case gpu::Semantic::COMPRESSED_BC6_RGB: + case gpu::Semantic::COMPRESSED_BC7_SRGBA: return false; default: return true; diff --git a/libraries/gpu-gl/src/gpu/gl45/GL45BackendTexture.cpp b/libraries/gpu-gl/src/gpu/gl45/GL45BackendTexture.cpp index 558f221705..fda7ac22dd 100644 --- a/libraries/gpu-gl/src/gpu/gl45/GL45BackendTexture.cpp +++ b/libraries/gpu-gl/src/gpu/gl45/GL45BackendTexture.cpp @@ -33,6 +33,8 @@ using namespace gpu::gl45; bool GL45Backend::supportedTextureFormat(const gpu::Element& format) { switch (format.getSemantic()) { + // ETC textures are actually required by the OpenGL spec as of 4.3, but aren't always supported by hardware + // They'll be recompressed by OpenGL, which will be slow or have poor quality, so disable them for now case gpu::Semantic::COMPRESSED_ETC2_RGB: case gpu::Semantic::COMPRESSED_ETC2_SRGB: case gpu::Semantic::COMPRESSED_ETC2_RGB_PUNCHTHROUGH_ALPHA: