diff options
author | Piotr Dziwinski <piotrdz@gmail.com> | 2012-09-09 12:56:09 +0200 |
---|---|---|
committer | Piotr Dziwinski <piotrdz@gmail.com> | 2012-09-09 12:56:09 +0200 |
commit | c6673b9aee483cfa64b49395c5c96b023bb09549 (patch) | |
tree | 5a469b1ce32a149b28c327cff38ba43b6d984b75 /src/graphics/engine/engine.cpp | |
parent | c2c1294ec99e3dae593bb31d2f331738d5be91d5 (diff) | |
download | colobot-c6673b9aee483cfa64b49395c5c96b023bb09549.tar.gz colobot-c6673b9aee483cfa64b49395c5c96b023bb09549.tar.bz2 colobot-c6673b9aee483cfa64b49395c5c96b023bb09549.zip |
Texture format detection; minor fixes
- detection of texture format
- fixed depth mask bug
- minor refactoring
Diffstat (limited to 'src/graphics/engine/engine.cpp')
-rw-r--r-- | src/graphics/engine/engine.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/graphics/engine/engine.cpp b/src/graphics/engine/engine.cpp index ed7b9c7..068687a 100644 --- a/src/graphics/engine/engine.cpp +++ b/src/graphics/engine/engine.cpp @@ -208,7 +208,7 @@ Gfx::CEngine::CEngine(CInstanceManager *iMan, CApplication *app) m_mouseVisible = false; m_texPath = "textures/"; - m_defaultTexParams.format = Gfx::TEX_IMG_RGB; + m_defaultTexParams.format = Gfx::TEX_IMG_AUTO; m_defaultTexParams.mipmap = true; m_defaultTexParams.minFilter = Gfx::TEX_MIN_FILTER_LINEAR_MIPMAP_LINEAR; m_defaultTexParams.magFilter = Gfx::TEX_MAG_FILTER_LINEAR; @@ -2101,7 +2101,8 @@ void Gfx::CEngine::SetViewParams(const Math::Vector& eyePt, const Math::Vector& if (m_sound == nullptr) m_sound = static_cast<CSoundInterface*>( m_iMan->SearchInstance(CLASS_SOUND) ); - m_sound->SetListener(eyePt, lookatPt); + if (m_sound != nullptr) + m_sound->SetListener(eyePt, lookatPt); } Gfx::Texture Gfx::CEngine::CreateTexture(const std::string& texName, const Gfx::TextureCreateParams& params) |