From 4faaf6089a3880d673c5fc51a260128bfe59b351 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Tue, 21 Jan 2020 21:32:27 +0100 Subject: Remove unused #if 0'ed code --- drivers/gles2/rasterizer_storage_gles2.cpp | 21 +++++---------------- 1 file changed, 5 insertions(+), 16 deletions(-) (limited to 'drivers/gles2/rasterizer_storage_gles2.cpp') diff --git a/drivers/gles2/rasterizer_storage_gles2.cpp b/drivers/gles2/rasterizer_storage_gles2.cpp index 7980c43517..c633d17cca 100644 --- a/drivers/gles2/rasterizer_storage_gles2.cpp +++ b/drivers/gles2/rasterizer_storage_gles2.cpp @@ -1206,32 +1206,21 @@ void RasterizerStorageGLES2::sky_set_texture(RID p_sky, RID p_panorama, int p_ra GLenum type = GL_UNSIGNED_BYTE; // Set the initial (empty) mipmaps -#if 1 - //Mobile hardware (PowerVR specially) prefers this approach, the other one kills the game + // Mobile hardware (PowerVR specially) prefers this approach, + // the previous approach with manual lod levels kills the game. for (int i = 0; i < 6; i++) { glTexImage2D(GL_TEXTURE_CUBE_MAP_POSITIVE_X + i, 0, internal_format, size, size, 0, format, type, NULL); } glGenerateMipmap(GL_TEXTURE_CUBE_MAP); - //no filters for now + + // No filters for now glTexParameterf(GL_TEXTURE_CUBE_MAP, GL_TEXTURE_MIN_FILTER, GL_LINEAR); glTexParameterf(GL_TEXTURE_CUBE_MAP, GL_TEXTURE_MAG_FILTER, GL_LINEAR); glTexParameterf(GL_TEXTURE_CUBE_MAP, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); glTexParameterf(GL_TEXTURE_CUBE_MAP, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); -#else - while (size >= 1) { - - for (int i = 0; i < 6; i++) { - glTexImage2D(_cube_side_enum[i], lod, internal_format, size, size, 0, format, type, NULL); - } - - lod++; - - size >>= 1; - } -#endif - //framebuffer + // Framebuffer glBindFramebuffer(GL_FRAMEBUFFER, resources.mipmap_blur_fbo); -- cgit v1.2.3