diff options
author | Michał Konopacki <konopacki.m@gmail.com> | 2012-08-13 23:46:47 +0200 |
---|---|---|
committer | Michał Konopacki <konopacki.m@gmail.com> | 2012-08-13 23:46:47 +0200 |
commit | e942400c8bb9b6836bdfe705111f7ec63ef19e28 (patch) | |
tree | 66d5aea574f5a4530492b6ab69956003427df98b /src/graphics/opengl/gldevice.cpp | |
parent | 9ee1d2e172162be25b113595ad16779aa0a49a87 (diff) | |
parent | 8b2bca72dd71a1c23db51269a147443c80758f10 (diff) | |
download | colobot-e942400c8bb9b6836bdfe705111f7ec63ef19e28.tar.gz colobot-e942400c8bb9b6836bdfe705111f7ec63ef19e28.tar.bz2 colobot-e942400c8bb9b6836bdfe705111f7ec63ef19e28.zip |
Merge remote-tracking branch 'upstream/dev-ui' into dev-ui
Diffstat (limited to 'src/graphics/opengl/gldevice.cpp')
-rw-r--r-- | src/graphics/opengl/gldevice.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/graphics/opengl/gldevice.cpp b/src/graphics/opengl/gldevice.cpp index 3526b13..7221421 100644 --- a/src/graphics/opengl/gldevice.cpp +++ b/src/graphics/opengl/gldevice.cpp @@ -20,6 +20,7 @@ #include "common/config.h" #include "common/image.h" +#include "common/logger.h" #include "math/geometry.h" @@ -80,13 +81,10 @@ void Gfx::CGLDevice::DebugHook() glColor3i(0, 0, 0); } -std::string Gfx::CGLDevice::GetError() -{ - return m_error; -} - bool Gfx::CGLDevice::Create() { + GetLogger()->Info("Creating CDevice\n"); + #if defined(USE_GLEW) static bool glewInited = false; @@ -96,13 +94,13 @@ bool Gfx::CGLDevice::Create() if (glewInit() != GLEW_OK) { - m_error = "GLEW initialization failed"; + GetLogger()->Error("GLEW initialization failed\n"); return false; } if ( (! GLEW_ARB_multitexture) || (! GLEW_EXT_texture_env_combine) || (! GLEW_EXT_secondary_color) ) { - m_error = "GLEW reports required extensions not supported"; + GetLogger()->Error("GLEW reports required extensions not supported\n"); return false; } } @@ -142,6 +140,8 @@ bool Gfx::CGLDevice::Create() m_texturesEnabled = std::vector<bool> (maxTextures, false); m_textureStageParams = std::vector<Gfx::TextureStageParams>(maxTextures, Gfx::TextureStageParams()); + GetLogger()->Info("CDevice created successfully\n"); + return true; } @@ -385,7 +385,7 @@ Gfx::Texture Gfx::CGLDevice::CreateTexture(CImage *image, const Gfx::TextureCrea ImageData *data = image->GetData(); if (data == NULL) { - m_error = "Invalid texture data"; + GetLogger()->Error("Invalid texture data\n"); return Gfx::Texture(); // invalid texture } |