Indentation style changed to Horstmann
This commit is contained in:
+7
-14
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user