diff options
Diffstat (limited to 'drivers/gles3/storage/config.cpp')
-rw-r--r-- | drivers/gles3/storage/config.cpp | 42 |
1 files changed, 17 insertions, 25 deletions
diff --git a/drivers/gles3/storage/config.cpp b/drivers/gles3/storage/config.cpp index 03dde88d4b..be7555788a 100644 --- a/drivers/gles3/storage/config.cpp +++ b/drivers/gles3/storage/config.cpp @@ -31,17 +31,9 @@ #ifdef GLES3_ENABLED #include "config.h" -#include "core/config/project_settings.h" -#include "core/templates/vector.h" -#ifdef ANDROID_ENABLED -#include <GLES3/gl3.h> -#include <GLES3/gl3ext.h> -#include <GLES3/gl3platform.h> - -#include <EGL/egl.h> -#include <EGL/eglext.h> -#endif +#include "../rasterizer_gles3.h" +#include "texture_storage.h" using namespace GLES3; @@ -69,24 +61,24 @@ Config::Config() { astc_hdr_supported = extensions.has("GL_KHR_texture_compression_astc_ldr"); astc_layered_supported = extensions.has("GL_KHR_texture_compression_astc_sliced_3d"); -#ifdef GLES_OVER_GL - float_texture_supported = true; - etc2_supported = false; - s3tc_supported = true; - rgtc_supported = true; //RGTC - core since OpenGL version 3.0 -#else - float_texture_supported = extensions.has("GL_EXT_color_buffer_float"); - etc2_supported = true; + if (RasterizerGLES3::is_gles_over_gl()) { + float_texture_supported = true; + etc2_supported = false; + s3tc_supported = true; + rgtc_supported = true; //RGTC - core since OpenGL version 3.0 + } else { + float_texture_supported = extensions.has("GL_EXT_color_buffer_float"); + etc2_supported = true; #if defined(ANDROID_ENABLED) || defined(IOS_ENABLED) - // Some Android devices report support for S3TC but we don't expect that and don't export the textures. - // This could be fixed but so few devices support it that it doesn't seem useful (and makes bigger APKs). - // For good measure we do the same hack for iOS, just in case. - s3tc_supported = false; + // Some Android devices report support for S3TC but we don't expect that and don't export the textures. + // This could be fixed but so few devices support it that it doesn't seem useful (and makes bigger APKs). + // For good measure we do the same hack for iOS, just in case. + s3tc_supported = false; #else - s3tc_supported = extensions.has("GL_EXT_texture_compression_dxt1") || extensions.has("GL_EXT_texture_compression_s3tc") || extensions.has("WEBGL_compressed_texture_s3tc"); -#endif - rgtc_supported = extensions.has("GL_EXT_texture_compression_rgtc") || extensions.has("GL_ARB_texture_compression_rgtc") || extensions.has("EXT_texture_compression_rgtc"); + s3tc_supported = extensions.has("GL_EXT_texture_compression_dxt1") || extensions.has("GL_EXT_texture_compression_s3tc") || extensions.has("WEBGL_compressed_texture_s3tc"); #endif + rgtc_supported = extensions.has("GL_EXT_texture_compression_rgtc") || extensions.has("GL_ARB_texture_compression_rgtc") || extensions.has("EXT_texture_compression_rgtc"); + } glGetInteger64v(GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS, &max_vertex_texture_image_units); glGetInteger64v(GL_MAX_TEXTURE_IMAGE_UNITS, &max_texture_image_units); |