setting texture mode when blending

git-svn-id: svn://anubis/anaglym/trunk@314 99a6e188-d820-4881-8870-2d33a10e2619
This commit is contained in:
Josh Holtrop 2010-09-17 16:42:01 +00:00
parent 9ea65f4e65
commit 3e3ba194f9

View File

@ -1426,13 +1426,14 @@ void Engine::Object::render()
int attrib_flags = GL_ENABLE_BIT; int attrib_flags = GL_ENABLE_BIT;
if (m_enable_blending) if (m_enable_blending)
{ {
attrib_flags |= GL_COLOR_BUFFER_BIT; attrib_flags |= GL_COLOR_BUFFER_BIT | GL_TEXTURE_BIT;
} }
glPushAttrib(attrib_flags); glPushAttrib(attrib_flags);
if (m_enable_blending) if (m_enable_blending)
{ {
glEnable(GL_BLEND); glEnable(GL_BLEND);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);
} }
if (m_texture != 0) if (m_texture != 0)
{ {