From 911faa0676d3534d490ccf44df252b119fca90db Mon Sep 17 00:00:00 2001 From: hiker Date: Thu, 22 May 2014 16:06:32 +1000 Subject: [PATCH] Fix #1339. --- src/graphics/irr_driver.hpp | 2 +- src/graphics/render.cpp | 14 -------------- 2 files changed, 1 insertion(+), 15 deletions(-) diff --git a/src/graphics/irr_driver.hpp b/src/graphics/irr_driver.hpp index 91c6c6aa0..dff1932c0 100644 --- a/src/graphics/irr_driver.hpp +++ b/src/graphics/irr_driver.hpp @@ -233,7 +233,7 @@ private: RES_CHANGE_CANCEL} m_resolution_changing; public: - GLuint SkyboxCubeMap, FakeSkybox; + GLuint SkyboxCubeMap; /** A simple class to store video resolutions. */ class VideoMode { diff --git a/src/graphics/render.cpp b/src/graphics/render.cpp index 9b1a95716..d971b16a3 100644 --- a/src/graphics/render.cpp +++ b/src/graphics/render.cpp @@ -1375,20 +1375,6 @@ void IrrDriver::generateSkyboxCubemap() void IrrDriver::renderSkybox(const scene::ICameraSceneNode *camera) { - if (SkyboxTextures.empty() && FakeSkybox) - { - glGenTextures(1, &FakeSkybox); - - unsigned w = 1, h = 1; - - char *rgba[6]; - for (unsigned i = 0; i < 6; i++) - rgba[i] = new char[w * h * 4]; - for (unsigned i = 0; i < 6; i++) - glTexImage2D(GL_TEXTURE_CUBE_MAP_POSITIVE_X + i, 0, GL_COMPRESSED_SRGB_ALPHA, w, h, 0, GL_BGRA, GL_UNSIGNED_BYTE, 0); - return; - } - if (!SkyboxCubeMap) generateSkyboxCubemap(); glBindVertexArray(MeshShader::SkyboxShader::cubevao);