diff options
author | Piotr Dziwinski <piotrdz@gmail.com> | 2012-08-12 19:30:31 +0200 |
---|---|---|
committer | Piotr Dziwinski <piotrdz@gmail.com> | 2012-08-12 19:30:31 +0200 |
commit | 146ad47e4afbf1fe82763c94c2cd2209285f869f (patch) | |
tree | 526bdbcd20655fa77b32dee18bf9debe6df10fc7 /src/graphics/opengl | |
parent | 6ab1746ec97ac12d00180c951248c45b1c57bd12 (diff) | |
parent | 45a5e1e865ec02892054080e1fc0b7e7c463e9d3 (diff) | |
download | colobot-146ad47e4afbf1fe82763c94c2cd2209285f869f.tar.gz colobot-146ad47e4afbf1fe82763c94c2cd2209285f869f.tar.bz2 colobot-146ad47e4afbf1fe82763c94c2cd2209285f869f.zip |
Merge branch 'dev-graphics' into dev
CEngine object handling
Diffstat (limited to 'src/graphics/opengl')
-rw-r--r-- | src/graphics/opengl/gldevice.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/graphics/opengl/gldevice.cpp b/src/graphics/opengl/gldevice.cpp index caa79ee..3526b13 100644 --- a/src/graphics/opengl/gldevice.cpp +++ b/src/graphics/opengl/gldevice.cpp @@ -396,7 +396,6 @@ Gfx::Texture Gfx::CGLDevice::CreateTexture(ImageData *data, const Gfx::TextureCr { Gfx::Texture result; - result.valid = true; result.size.x = data->surface->w; result.size.y = data->surface->h; @@ -463,7 +462,7 @@ Gfx::Texture Gfx::CGLDevice::CreateTexture(ImageData *data, const Gfx::TextureCr // Restore the previous state of 1st stage - if (m_currentTextures[0].valid) + if (m_currentTextures[0].Valid()) glBindTexture(GL_TEXTURE_2D, m_currentTextures[0].id); else glBindTexture(GL_TEXTURE_2D, 0); @@ -518,7 +517,7 @@ void Gfx::CGLDevice::SetTexture(int index, const Gfx::Texture &texture) m_currentTextures[index] = texture; // remember the change - if (! texture.valid) + if (! texture.Valid()) { glBindTexture(GL_TEXTURE_2D, 0); // unbind texture } @@ -596,7 +595,7 @@ void Gfx::CGLDevice::SetTextureStageParams(int index, const Gfx::TextureStagePar m_textureStageParams[index] = params; // Don't actually do anything if texture not set - if (! m_currentTextures[index].valid) + if (! m_currentTextures[index].Valid()) return; // Enable the given stage |