diff mbox

[Branch,~glmark2-dev/glmark2/trunk] Rev 47: Remove redundant switch statement.

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

Commit Message

Alexandros Frantzis July 21, 2011, 12:36 p.m. UTC
------------------------------------------------------------
revno: 47
committer: Alexandros Frantzis <alf82@freemail.gr>
timestamp: Mon 2010-07-12 18:52:43 +0300
message:
  Remove redundant switch statement.
modified:
  src/sceneshading.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 'src/sceneshading.cpp'
--- src/sceneshading.cpp	2010-07-12 10:06:29 +0000
+++ src/sceneshading.cpp	2010-07-12 15:52:43 +0000
@@ -65,17 +65,7 @@ 
     float materialSpecular[] = {1.0f, 1.0f, 1.0f, 1.0f};
     float materialColor[] = {0.0f, 0.0f, 1.0f, 1.0f};
 
-    switch(mCurrentPart)
-    {
-    case 0:
-        glDisable(GL_TEXTURE_2D);
-        mShader[0].use();
-        break;
-    case 1:
-        glDisable(GL_TEXTURE_2D);
-        mShader[1].use();
-        break;
-    }
+    mShader[mCurrentPart].use();
 
     // Load lighting and material uniforms
     glUniform4fv(mShader[mCurrentPart].mLocations.LightSourcePosition, 1, lightPosition);