changeset 57:3f635b7ea2cf

Back out changeset 73fa5fb437a0.
author Matti Hamalainen <ccr@tnsp.org>
date Sat, 07 Dec 2019 00:01:35 +0200
parents 8b335eb444ae
children 801d4c5c0f23
files gldragon.cpp
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/gldragon.cpp	Fri Dec 06 23:52:14 2019 +0200
+++ b/gldragon.cpp	Sat Dec 07 00:01:35 2019 +0200
@@ -240,6 +240,8 @@
     // Enable normal rescaling
     glEnable(GL_RESCALE_NORMAL);
 
+    glEnable(GL_COLOR_MATERIAL);
+
     // Setup depth buffer
     glClearDepth(1.0f);
 
@@ -269,7 +271,6 @@
     }
 
     // Set the material of the model
-    glEnable(GL_COLOR_MATERIAL);
     glColorMaterial(GL_FRONT, GL_AMBIENT_AND_DIFFUSE);
     glMateriali(GL_FRONT, GL_SHININESS, model.material.shininess);
     glMaterialfv(GL_FRONT, GL_SPECULAR, model.material.specular.values);