History

Merged from master. Get rid of redundant GL fog states. Moved local light parameters to shader uniform arrays.

TonyPeng committed 12 years ago

Commit ef4b95c1 parent 56eadcb12 files · +16 −15Browse files

Showing the changes to interface/src/renderer/ProgramObject.cpp (1 of 12 files). Show all

Unified · Split

interface/src/renderer/ProgramObject.cpp+1−1
@@ -26,7 +26,7 @@ void ProgramObject::setUniform(const char* name, const glm::vec3& value) { · 25 unmodified lines
26void ProgramObject::setUniformArray(const char* name, const glm::vec3* values, int count) {26void ProgramObject::setUniformArray(const char* name, const glm::vec3* values, int count) {
27 GLfloat* floatVal = new GLfloat[count*3];27 GLfloat* floatVal = new GLfloat[count*3];
28 int index = 0;28 int index = 0;
29 for(int i = 0; i < count; i++) {29 for (int i = 0; i < count; i++) {
30 assert(index < count*3);30 assert(index < count*3);
31 const float* valPtr = glm::value_ptr(values[i]);31 const float* valPtr = glm::value_ptr(values[i]);
32 floatVal[index++] = valPtr[0];32 floatVal[index++] = valPtr[0];