pushing attributes before binding textures

git-svn-id: svn://anubis/misc/wfobj@212 bd8a9e45-a331-0410-811e-c64571078777
This commit is contained in:
josh 2009-11-16 22:30:39 +00:00
parent d69b65e95f
commit 3a42a0cb47

View File

@ -570,6 +570,7 @@ void WFObj::WFMtl::renderBegin(const string & mtlname, bool doTextureInfo)
*m_obj->m_fileLoader);
if (tex > 0)
{
pushAttributes(); /* jh 2009-11-16 */
#ifdef DEBUGGL
cout << " glBindTexture(GL_TEXTURE_2D, " << tex << ")" << endl;
#endif
@ -612,7 +613,8 @@ void WFObj::WFMtl::pushAttributes()
return;
m_attributesPushed = true;
#ifdef DEBUGGL
cout << " glPushAttrib(GL_LIGHTING_BIT | GL_TEXTURE_BIT | GL_ENABLE_BIT)" << endl;
cout << " glPushAttrib(GL_LIGHTING_BIT | GL_TEXTURE_BIT | GL_ENABLE_BIT)"
<< endl;
#endif
glPushAttrib(GL_LIGHTING_BIT | GL_TEXTURE_BIT | GL_ENABLE_BIT);
}