added Ns support to WFObj, updated viewing method

git-svn-id: svn://anubis/misc/wfobj-view@36 bd8a9e45-a331-0410-811e-c64571078777
This commit is contained in:
josh committed 2008-02-15 01:28:33 +00:00
1 parent d476dd822f
commit 4f5ab0b6a3
2 files changed
+23 -3

No files matched your search

+15
View File
@@ -472,6 +472,21 @@ void WFMtl::renderBegin(const string & mtlname)
didSomething = true;
}
}
else if (type == "Ns") /* set shininess */
{
if (stmts[i].size() == 2)
{
pushAttributes();
GLfloat shininess = 0.0f;
sscanf(stmts[i][1].c_str(), "%f", &shininess);
#ifdef DEBUGGL
cout << " glMaterialf(GL_FRONT, GL_SHININESS, "
<< shininess << ")" << endl;
#endif
glMaterialf(GL_FRONT, GL_SHININESS, shininess);
didSomething = true;
}
}
else if (type == "map_Kd") /* load a diffuse texture */
{
/* TODO: figure out how i want to load the texture */