summaryrefslogtreecommitdiffstats
path: root/src/graphics/opengl/gldevice.cpp
diff options
context:
space:
mode:
authorPiotr Dziwinski <piotrdz@gmail.com>2012-08-12 19:28:22 +0200
committerPiotr Dziwinski <piotrdz@gmail.com>2012-08-12 19:28:22 +0200
commit45a5e1e865ec02892054080e1fc0b7e7c463e9d3 (patch)
tree7cbeeb13b077c677f170595e53fab48e8699cae7 /src/graphics/opengl/gldevice.cpp
parentb4b74c30e9aa93ae736db73df5cb0c5d508ec6ed (diff)
downloadcolobot-45a5e1e865ec02892054080e1fc0b7e7c463e9d3.tar.gz
colobot-45a5e1e865ec02892054080e1fc0b7e7c463e9d3.tar.bz2
colobot-45a5e1e865ec02892054080e1fc0b7e7c463e9d3.zip
Object handling in CEngine
- finished rewriting CEngine object, shadow, etc. handling - refactored texture code - added new log levels
Diffstat (limited to 'src/graphics/opengl/gldevice.cpp')
-rw-r--r--src/graphics/opengl/gldevice.cpp7
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