diff mbox

[Branch,~glmark2-dev/glmark2/trunk] Rev 9: Enable lighting when starting each scene (not just the first one), so that they can be started in...

Message ID 20110721123630.17019.63963.launchpad@loganberry.canonical.com
State Accepted
Headers show

Commit Message

Alexandros Frantzis July 21, 2011, 12:36 p.m. UTC
------------------------------------------------------------
revno: 9
committer: Alexandros Frantzis <alf82@freemail.gr>
timestamp: Thu 2010-07-08 11:18:12 +0300
message:
  Enable lighting when starting each scene (not just the first one), so that they can be started independently.
modified:
  sceneshading.cpp
  scenetexture.cpp


--
lp:glmark2
https://code.launchpad.net/~glmark2-dev/glmark2/trunk

You are subscribed to branch lp:glmark2.
To unsubscribe from this branch go to https://code.launchpad.net/~glmark2-dev/glmark2/trunk/+edit-subscription
diff mbox

Patch

=== modified file 'sceneshading.cpp'
--- sceneshading.cpp	2010-07-07 12:42:25 +0000
+++ sceneshading.cpp	2010-07-08 08:18:12 +0000
@@ -54,18 +54,18 @@ 
     float mat_diffuse[] = {0.1f, 0.5f, 0.8f, 1.0f};
     float mat_specular[] = {1.0f, 1.0f, 1.0f, 1.0f};
     float high_shininess = 100.0f;
-    
+
     glMaterialfv(GL_FRONT, GL_AMBIENT, no_mat);
     glMaterialfv(GL_FRONT, GL_DIFFUSE, mat_diffuse);
     glMaterialfv(GL_FRONT, GL_SPECULAR, mat_specular);
     glMaterialf(GL_FRONT, GL_SHININESS, high_shininess);
     glMaterialfv(GL_FRONT, GL_EMISSION, no_mat);
-        
-        
+
     glLightfv(GL_LIGHT0, GL_AMBIENT, lightAmbient);
     glLightfv(GL_LIGHT0, GL_DIFFUSE, lightDiffuse);
     glLightfv(GL_LIGHT0, GL_POSITION, lightPosition);
     glEnable(GL_LIGHT0);
+    glEnable(GL_LIGHTING);
 
     switch(mCurrentPart)
     {

=== modified file 'scenetexture.cpp'
--- scenetexture.cpp	2010-07-07 12:29:59 +0000
+++ scenetexture.cpp	2010-07-08 08:18:12 +0000
@@ -54,6 +54,7 @@ 
     glLightfv(GL_LIGHT0, GL_DIFFUSE, lightDiffuse);
     glLightfv(GL_LIGHT0, GL_POSITION, lightPosition);
     glEnable(GL_LIGHT0);
+    glEnable(GL_LIGHTING);
     
     glEnable(GL_TEXTURE_2D);