pushing attributes before binding textures
git-svn-id: svn://anubis/misc/wfobj@212 bd8a9e45-a331-0410-811e-c64571078777
This commit is contained in:
parent
d69b65e95f
commit
3a42a0cb47
4
WFObj.cc
4
WFObj.cc
@ -570,6 +570,7 @@ void WFObj::WFMtl::renderBegin(const string & mtlname, bool doTextureInfo)
|
|||||||
*m_obj->m_fileLoader);
|
*m_obj->m_fileLoader);
|
||||||
if (tex > 0)
|
if (tex > 0)
|
||||||
{
|
{
|
||||||
|
pushAttributes(); /* jh 2009-11-16 */
|
||||||
#ifdef DEBUGGL
|
#ifdef DEBUGGL
|
||||||
cout << " glBindTexture(GL_TEXTURE_2D, " << tex << ")" << endl;
|
cout << " glBindTexture(GL_TEXTURE_2D, " << tex << ")" << endl;
|
||||||
#endif
|
#endif
|
||||||
@ -612,7 +613,8 @@ void WFObj::WFMtl::pushAttributes()
|
|||||||
return;
|
return;
|
||||||
m_attributesPushed = true;
|
m_attributesPushed = true;
|
||||||
#ifdef DEBUGGL
|
#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
|
#endif
|
||||||
glPushAttrib(GL_LIGHTING_BIT | GL_TEXTURE_BIT | GL_ENABLE_BIT);
|
glPushAttrib(GL_LIGHTING_BIT | GL_TEXTURE_BIT | GL_ENABLE_BIT);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user