From c6673b9aee483cfa64b49395c5c96b023bb09549 Mon Sep 17 00:00:00 2001 From: Piotr Dziwinski Date: Sun, 9 Sep 2012 12:56:09 +0200 Subject: Texture format detection; minor fixes - detection of texture format - fixed depth mask bug - minor refactoring --- src/graphics/engine/engine.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/graphics/engine/engine.cpp') 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( 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) -- cgit v1.2.3-1-g7c22