Revert "Indentation style changed to Horstmann"
This reverts commit f2259f712d.
Conflicts:
src/GameWorld.cpp
src/Systems/PhysicsSystem.cpp
This commit is contained in:
+14
-7
@@ -2,7 +2,8 @@
|
||||
#include "CubemapTexture.h"
|
||||
|
||||
CubemapTexture::CubemapTexture(std::string posXFile, std::string negXFile, std::string posYFile, std::string negYFile, std::string posZFile, std::string negZFile)
|
||||
{ m_Loaded = false;
|
||||
{
|
||||
m_Loaded = false;
|
||||
m_Texture = 0;
|
||||
m_TextureFiles[0] = posXFile;
|
||||
m_TextureFiles[1] = negXFile;
|
||||
@@ -13,13 +14,16 @@ CubemapTexture::CubemapTexture(std::string posXFile, std::string negXFile, std::
|
||||
}
|
||||
|
||||
CubemapTexture::~CubemapTexture()
|
||||
{ if (m_Texture != 0)
|
||||
{ //glDeleteTextures(1, &m_Texture);
|
||||
{
|
||||
if (m_Texture != 0)
|
||||
{
|
||||
//glDeleteTextures(1, &m_Texture);
|
||||
}
|
||||
}
|
||||
|
||||
void CubemapTexture::Load()
|
||||
{ m_Loaded = true;
|
||||
{
|
||||
m_Loaded = true;
|
||||
|
||||
m_Texture = SOIL_load_OGL_cubemap(
|
||||
m_TextureFiles[0].c_str(),
|
||||
@@ -33,7 +37,8 @@ void CubemapTexture::Load()
|
||||
0);
|
||||
|
||||
if (m_Texture == 0)
|
||||
{ LOG_ERROR("SOIL cubemap loading error: %s", SOIL_last_result());
|
||||
{
|
||||
LOG_ERROR("SOIL cubemap loading error: %s", SOIL_last_result());
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -45,8 +50,10 @@ void CubemapTexture::Load()
|
||||
}
|
||||
|
||||
void CubemapTexture::Bind(GLenum textureUnit)
|
||||
{ if (!m_Loaded)
|
||||
{ LOG_WARNING("Cubemap \"%s\" was not loaded before being bound! Attempting to load now...", m_TextureFiles[0].c_str());
|
||||
{
|
||||
if (!m_Loaded)
|
||||
{
|
||||
LOG_WARNING("Cubemap \"%s\" was not loaded before being bound! Attempting to load now...", m_TextureFiles[0].c_str());
|
||||
Load();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user