diff options
author | Juan Linietsky <juan@godotengine.org> | 2019-02-26 11:58:47 -0300 |
---|---|---|
committer | Juan Linietsky <juan@godotengine.org> | 2019-02-26 11:58:47 -0300 |
commit | 5eeb06ffd1bf9cc79142760c372c17cd858cbe49 (patch) | |
tree | 824bdca6e0072ff877a1944c5b2c248c2bca0fbb /drivers/gles2/rasterizer_storage_gles2.cpp | |
parent | 329904598829dcbed462b012dee39bc37d7d7c83 (diff) |
-Remove harcoded opengl extension testing from OS, ask rasterizer instead.
-Fixed a bug where etc textures were imported broken
Diffstat (limited to 'drivers/gles2/rasterizer_storage_gles2.cpp')
-rw-r--r-- | drivers/gles2/rasterizer_storage_gles2.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/gles2/rasterizer_storage_gles2.cpp b/drivers/gles2/rasterizer_storage_gles2.cpp index 0acbb8cf51..db88339249 100644 --- a/drivers/gles2/rasterizer_storage_gles2.cpp +++ b/drivers/gles2/rasterizer_storage_gles2.cpp @@ -4922,6 +4922,9 @@ bool RasterizerStorageGLES2::free(RID p_rid) { bool RasterizerStorageGLES2::has_os_feature(const String &p_feature) const { + if (p_feature == "pvrtc") + return config.pvrtc_supported; + if (p_feature == "s3tc") return config.s3tc_supported; @@ -4971,12 +4974,14 @@ void RasterizerStorageGLES2::initialize() { #ifdef GLES_OVER_GL config.float_texture_supported = true; config.s3tc_supported = true; + config.pvrtc_supported = false; config.etc1_supported = false; config.support_npot_repeat_mipmap = true; #else config.float_texture_supported = config.extensions.has("GL_ARB_texture_float") || config.extensions.has("GL_OES_texture_float"); config.s3tc_supported = config.extensions.has("GL_EXT_texture_compression_s3tc") || config.extensions.has("WEBGL_compressed_texture_s3tc"); config.etc1_supported = config.extensions.has("GL_OES_compressed_ETC1_RGB8_texture") || config.extensions.has("WEBGL_compressed_texture_etc1"); + config.pvrtc_supported = config.extensions.has("IMG_texture_compression_pvrtc"); config.support_npot_repeat_mipmap = config.extensions.has("GL_OES_texture_npot"); #endif |