summaryrefslogtreecommitdiffstats
path: root/progs
diff options
context:
space:
mode:
authorBrian Paul <brianp@vmware.com>2009-10-01 13:07:01 -0600
committerBrian Paul <brianp@vmware.com>2009-10-01 13:14:50 -0600
commit8d93a4c6398129a80a6e049aea88ab7a82f3d110 (patch)
tree6100e0b25313ced7750a9fbda77f3c176c121cba /progs
parentc7c62521fbb0d525f89225d9bd42a5443503c967 (diff)
downloadexternal_mesa3d-8d93a4c6398129a80a6e049aea88ab7a82f3d110.zip
external_mesa3d-8d93a4c6398129a80a6e049aea88ab7a82f3d110.tar.gz
external_mesa3d-8d93a4c6398129a80a6e049aea88ab7a82f3d110.tar.bz2
objview: clean up drawing VBO code
Diffstat (limited to 'progs')
-rw-r--r--progs/objviewer/glmdraw.c27
1 files changed, 1 insertions, 26 deletions
diff --git a/progs/objviewer/glmdraw.c b/progs/objviewer/glmdraw.c
index cc986d9..8b214cd 100644
--- a/progs/objviewer/glmdraw.c
+++ b/progs/objviewer/glmdraw.c
@@ -252,7 +252,6 @@ void
glmDrawVBO(GLMmodel *model)
{
GLMgroup* group;
- int mode = GLM_MATERIAL;
assert(model->vbo);
@@ -279,38 +278,14 @@ glmDrawVBO(GLMmodel *model)
glScalef(model->scale, model->scale, model->scale);
for (group = model->groups; group; group = group->next) {
- if (0&&strcmp(group->name, "Fuselage") != 0)
- continue;
-
if (group->numtriangles > 0) {
- if (model->materials && (mode & GLM_MATERIAL)) {
-#if 0
- glMaterialfv(GL_FRONT_AND_BACK, GL_AMBIENT,
- model->materials[group->material].ambient);
- glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE,
- model->materials[group->material].diffuse);
- glMaterialfv(GL_FRONT_AND_BACK, GL_SPECULAR,
- model->materials[group->material].specular);
- glMaterialf(GL_FRONT_AND_BACK, GL_SHININESS,
- model->materials[group->material].shininess);
-#else
- glmShaderMaterial(&model->materials[group->material]);
-#endif
- }
-
+ glmShaderMaterial(&model->materials[group->material]);
-#if 0
- glDrawElements(GL_TRIANGLES, 3 * group->numtriangles,
- GL_UNSIGNED_INT, group->triIndexes);
-#else
glDrawRangeElements(GL_TRIANGLES,
group->minIndex, group->maxIndex,
3 * group->numtriangles,
GL_UNSIGNED_INT, group->triIndexes);
-#endif
-
- glDisable(GL_BLEND);
}
}