This commit is contained in:
hiker 2014-05-22 16:06:32 +10:00
parent d5f781433d
commit 911faa0676
2 changed files with 1 additions and 15 deletions

View File

@ -233,7 +233,7 @@ private:
RES_CHANGE_CANCEL} m_resolution_changing; RES_CHANGE_CANCEL} m_resolution_changing;
public: public:
GLuint SkyboxCubeMap, FakeSkybox; GLuint SkyboxCubeMap;
/** A simple class to store video resolutions. */ /** A simple class to store video resolutions. */
class VideoMode class VideoMode
{ {

View File

@ -1375,20 +1375,6 @@ void IrrDriver::generateSkyboxCubemap()
void IrrDriver::renderSkybox(const scene::ICameraSceneNode *camera) 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) if (!SkyboxCubeMap)
generateSkyboxCubemap(); generateSkyboxCubemap();
glBindVertexArray(MeshShader::SkyboxShader::cubevao); glBindVertexArray(MeshShader::SkyboxShader::cubevao);