Message ID | 20110721123633.17019.28839.launchpad@loganberry.canonical.com |
---|---|
State | Accepted |
Headers | show |
=== 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);