This is an automated email from the git hooks/post-receive script. odyx pushed a commit to branch upstream/latest in repository colobot.
commit a045bf3830464aaa1affad39f6855d31d2fc4d20 Author: Tomasz Kapuściński <tomaszka...@gmail.com> Date: Thu May 21 16:47:24 2015 +0200 Added shadow ambient support --- src/graphics/opengl/gldevice.cpp | 10 ++++++++++ src/graphics/opengl/gldevice.h | 2 ++ 2 files changed, 12 insertions(+) diff --git a/src/graphics/opengl/gldevice.cpp b/src/graphics/opengl/gldevice.cpp index 2537756..f8fc2fa 100644 --- a/src/graphics/opengl/gldevice.cpp +++ b/src/graphics/opengl/gldevice.cpp @@ -49,6 +49,7 @@ CGLDevice::CGLDevice(const GLDeviceConfig &config) m_glMajor = 1; m_glMinor = 1; m_shadowMappingSupport = SMS_NONE; + m_shadowAmbientSupported = false; m_framebuffer = 0; m_colorBuffer = 0; @@ -221,6 +222,10 @@ bool CGLDevice::Create() GetLogger()->Info("Shadow mapping not available\n"); } + m_shadowAmbientSupported = glewIsSupported("GL_ARB_shadow_ambient"); + if (m_shadowAmbientSupported) + GetLogger()->Info("Shadow ambient supported\n"); + // Detect support of anisotropic filtering m_anisotropyAvailable = glewIsSupported("GL_EXT_texture_filter_anisotropic"); if(m_anisotropyAvailable) @@ -791,6 +796,11 @@ Texture CGLDevice::CreateDepthTexture(int width, int height, int depth) glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_COMPARE_FUNC_ARB, GL_LEQUAL); } + if (m_shadowAmbientSupported) + { + glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_COMPARE_FAIL_VALUE_ARB, 0.35f); + } + float color[] = { 1.0f, 1.0f, 1.0f, 1.0f }; glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); diff --git a/src/graphics/opengl/gldevice.h b/src/graphics/opengl/gldevice.h index b754edc..d1f085a 100644 --- a/src/graphics/opengl/gldevice.h +++ b/src/graphics/opengl/gldevice.h @@ -225,6 +225,8 @@ private: int m_glMajor, m_glMinor; //! Depth texture support ShadowMappingSupport m_shadowMappingSupport; + //! Shadow ambient support + bool m_shadowAmbientSupported; //! Whether to use multitexturing bool m_multitextureAvailable; //! Whether to use VBOs or display lists -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/colobot.git _______________________________________________ Pkg-games-commits mailing list Pkg-games-commits@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-games-commits