diff mbox

[Branch,~glmark2-dev/glmark2/trunk] Rev 24: Add more light and material related uniforms to shader.

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

Commit Message

Alexandros Frantzis July 21, 2011, 12:36 p.m. UTC
------------------------------------------------------------
revno: 24
committer: Alexandros Frantzis <alf82@freemail.gr>
timestamp: Fri 2010-07-09 12:43:26 +0300
message:
  Add more light and material related uniforms to shader.
modified:
  shader.cpp
  shader.h


--
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 'shader.cpp'
--- shader.cpp	2010-07-08 08:27:40 +0000
+++ shader.cpp	2010-07-09 09:43:26 +0000
@@ -79,17 +79,35 @@ 
             "NormalMatrix");
     mLocations.LightSourcePosition = glGetUniformLocation(mShaderProgram,
             "LightSourcePosition");
+    mLocations.LightSourceHalfVector = glGetUniformLocation(mShaderProgram,
+            "LightSourceHalfVector");
+
+    mLocations.LightSourceAmbient = glGetUniformLocation(mShaderProgram,
+            "LightSourceAmbient");
     mLocations.LightSourceDiffuse = glGetUniformLocation(mShaderProgram,
             "LightSourceDiffuse");
+    mLocations.LightSourceSpecular = glGetUniformLocation(mShaderProgram,
+            "LightSourceSpecular");
+
+    mLocations.MaterialAmbient = glGetUniformLocation(mShaderProgram,
+            "MaterialAmbient");
     mLocations.MaterialDiffuse = glGetUniformLocation(mShaderProgram,
             "MaterialDiffuse");
+    mLocations.MaterialSpecular = glGetUniformLocation(mShaderProgram,
+            "MaterialSpecular");
+
 #ifdef _DEBUG
-    printf("Uniform Locations: %d %d %d %d %d\n",
+    printf("Uniform Locations: %d %d %d %d %d %d %d %d\n",
             mLocations.ModelViewProjectionMatrix,
             mLocations.NormalMatrix,
             mLocations.LightSourcePosition,
+            mLocations.LightSourceHalfVector,
+            mLocations.LightSourceAmbient,
             mLocations.LightSourceDiffuse,
-            mLocations.MaterialDiffuse);
+            mLocations.LightSourceSpecular,
+            mLocations.MaterialAmbient,
+            mLocations.MaterialDiffuse,
+            mLocations.MaterialSpecular);
 #endif
 
 }

=== modified file 'shader.h'
--- shader.h	2010-07-08 08:27:40 +0000
+++ shader.h	2010-07-09 09:43:26 +0000
@@ -21,8 +21,13 @@ 
         GLint ModelViewProjectionMatrix;
         GLint NormalMatrix;
         GLint LightSourcePosition;
+        GLint LightSourceHalfVector;
+        GLint LightSourceAmbient;
         GLint LightSourceDiffuse;
+        GLint LightSourceSpecular;
+        GLint MaterialAmbient;
         GLint MaterialDiffuse;
+        GLint MaterialSpecular;
     } mLocations;
 
     enum {