Indentation style changed to Horstmann

This commit is contained in:
2014-04-11 21:53:05 +02:00
parent e70e18a27b
commit f2259f712d
61 changed files with 353 additions and 697 deletions
+7 -14
View File
@@ -2,8 +2,7 @@
#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;
@@ -14,16 +13,13 @@ 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(),
@@ -37,8 +33,7 @@ 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;
}
@@ -50,10 +45,8 @@ 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();
}