diff options
author | Vladimir Agafonkin <agafonkin@gmail.com> | 2018-02-07 18:04:14 +0200 |
---|---|---|
committer | Vladimir Agafonkin <agafonkin@gmail.com> | 2018-02-07 18:04:14 +0200 |
commit | 2f801e03e7f781cfea3c1c48cb2e6843675a9ec1 (patch) | |
tree | bbba0a68346c2bfad2f9d7850466bc32fead4bfe | |
parent | e8601a1f86ea542cea84899a2634af2b4707bfaa (diff) | |
download | qtlocation-mapboxgl-2f801e03e7f781cfea3c1c48cb2e6843675a9ec1.tar.gz |
check for float color buffer support
-rw-r--r-- | src/mbgl/gl/context.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/mbgl/gl/context.cpp b/src/mbgl/gl/context.cpp index 7f82034163..7ba8a2167e 100644 --- a/src/mbgl/gl/context.cpp +++ b/src/mbgl/gl/context.cpp @@ -128,10 +128,14 @@ void Context::initializeExtensions(const std::function<gl::ProcAddress(const cha #if MBGL_USE_GLES2 constexpr const char* halfFloatExtensionName = "OES_texture_half_float"; + constexpr const char* halfFloatColorBufferExtensionName = "EXT_color_buffer_half_float"; #else constexpr const char* halfFloatExtensionName = "ARB_half_float_pixel"; + constexpr const char* halfFloatColorBufferExtensionName = "ARB_color_buffer_float"; #endif - if (strstr(extensions, halfFloatExtensionName) != nullptr) { + if (strstr(extensions, halfFloatExtensionName) != nullptr && + strstr(extensions, halfFloatColorBufferExtensionName) != nullptr) { + halfFloat = true; } |