From 3a42a0cb47e883bb72a3e7592adb863d6b69230b Mon Sep 17 00:00:00 2001 From: josh Date: Mon, 16 Nov 2009 22:30:39 +0000 Subject: [PATCH] pushing attributes before binding textures git-svn-id: svn://anubis/misc/wfobj@212 bd8a9e45-a331-0410-811e-c64571078777 --- WFObj.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/WFObj.cc b/WFObj.cc index 740cbab..e988fa1 100644 --- a/WFObj.cc +++ b/WFObj.cc @@ -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); }