diff --git a/drivers/gles3/shader_gles3.cpp b/drivers/gles3/shader_gles3.cpp index fdc787b4a164..b963224c21c6 100644 --- a/drivers/gles3/shader_gles3.cpp +++ b/drivers/gles3/shader_gles3.cpp @@ -771,7 +771,7 @@ void ShaderGLES3::initialize(const String &p_general_defines, int p_base_texture print_verbose("Shader '" + name + "' SHA256: " + base_sha256); } - glGetIntegerv(GL_MAX_TEXTURE_IMAGE_UNITS, &max_image_units); + glGetInteger64v(GL_MAX_TEXTURE_IMAGE_UNITS, &max_image_units); } void ShaderGLES3::set_shader_cache_dir(const String &p_dir) { diff --git a/drivers/gles3/shader_gles3.h b/drivers/gles3/shader_gles3.h index c095c41e799d..7265202ced55 100644 --- a/drivers/gles3/shader_gles3.h +++ b/drivers/gles3/shader_gles3.h @@ -154,7 +154,7 @@ class ShaderGLES3 { static bool shader_cache_save_debug; bool shader_cache_dir_valid = false; - GLint max_image_units = 0; + int64_t max_image_units = 0; enum StageType { STAGE_TYPE_VERTEX, diff --git a/drivers/gles3/storage/config.cpp b/drivers/gles3/storage/config.cpp index 77a4553c763e..03dde88d4b47 100644 --- a/drivers/gles3/storage/config.cpp +++ b/drivers/gles3/storage/config.cpp @@ -53,9 +53,9 @@ Config::Config() { singleton = this; { - GLint max_extensions = 0; - glGetIntegerv(GL_NUM_EXTENSIONS, &max_extensions); - for (int i = 0; i < max_extensions; i++) { + int64_t max_extensions = 0; + glGetInteger64v(GL_NUM_EXTENSIONS, &max_extensions); + for (int64_t i = 0; i < max_extensions; i++) { const GLubyte *s = glGetStringi(GL_EXTENSIONS, i); if (!s) { break; @@ -88,11 +88,11 @@ Config::Config() { rgtc_supported = extensions.has("GL_EXT_texture_compression_rgtc") || extensions.has("GL_ARB_texture_compression_rgtc") || extensions.has("EXT_texture_compression_rgtc"); #endif - glGetIntegerv(GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS, &max_vertex_texture_image_units); - glGetIntegerv(GL_MAX_TEXTURE_IMAGE_UNITS, &max_texture_image_units); - glGetIntegerv(GL_MAX_TEXTURE_SIZE, &max_texture_size); - glGetIntegerv(GL_MAX_UNIFORM_BLOCK_SIZE, &max_uniform_buffer_size); - glGetIntegerv(GL_MAX_VIEWPORT_DIMS, max_viewport_size); + glGetInteger64v(GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS, &max_vertex_texture_image_units); + glGetInteger64v(GL_MAX_TEXTURE_IMAGE_UNITS, &max_texture_image_units); + glGetInteger64v(GL_MAX_TEXTURE_SIZE, &max_texture_size); + glGetInteger64v(GL_MAX_UNIFORM_BLOCK_SIZE, &max_uniform_buffer_size); + glGetInteger64v(GL_MAX_VIEWPORT_DIMS, max_viewport_size); support_anisotropic_filter = extensions.has("GL_EXT_texture_filter_anisotropic"); if (support_anisotropic_filter) { diff --git a/drivers/gles3/storage/config.h b/drivers/gles3/storage/config.h index 623f0442bdf0..6b90c8c359dc 100644 --- a/drivers/gles3/storage/config.h +++ b/drivers/gles3/storage/config.h @@ -58,14 +58,14 @@ class Config { bool use_nearest_mip_filter = false; bool use_depth_prepass = true; - int max_vertex_texture_image_units = 0; - int max_texture_image_units = 0; - int max_texture_size = 0; - int max_viewport_size[2] = { 0, 0 }; - int max_uniform_buffer_size = 0; - int max_renderable_elements = 0; - int max_renderable_lights = 0; - int max_lights_per_object = 0; + int64_t max_vertex_texture_image_units = 0; + int64_t max_texture_image_units = 0; + int64_t max_texture_size = 0; + int64_t max_viewport_size[2] = { 0, 0 }; + int64_t max_uniform_buffer_size = 0; + int64_t max_renderable_elements = 0; + int64_t max_renderable_lights = 0; + int64_t max_lights_per_object = 0; // TODO implement wireframe in OpenGL // bool generate_wireframes;