History

trying to remove useless glsl code for Legacy path

Sam Gateau committed 11 years ago

Commit 07bcd111 parent 68de91c2 files · +12 −10Browse files

Showing the changes to libraries/render-utils/src/DeferredLightingEffect.cpp (1 of 2 files). Show all

Unified · Split

libraries/render-utils/src/DeferredLightingEffect.cpp+6−4
@@ -496,10 +496,11 @@ void DeferredLightingEffect::loadLightProgram(const char* fragSource, bool limit · 495 unmodified lines
496496 GLint loc = -1;
497497
498498 #if (GPU_FEATURE_PROFILE == GPU_CORE)
499+ const GLint LIGHT_GPU_SLOT = 3;
499500 loc = glGetUniformBlockIndex(program.programId(), "lightBuffer");
500501 if (loc >= 0) {
501− glUniformBlockBinding(program.programId(), loc, 3);
502− locations.lightBufferUnit = 3;
502+ glUniformBlockBinding(program.programId(), loc, LIGHT_GPU_SLOT);
503+ locations.lightBufferUnit = LIGHT_GPU_SLOT;
503504 } else {
504505 locations.lightBufferUnit = -1;
505506 }
@@ -513,10 +514,11 @@ void DeferredLightingEffect::loadLightProgram(const char* fragSource, bool limit · 7 unmodified lines
513514 #endif
514515
515516 #if (GPU_FEATURE_PROFILE == GPU_CORE)
517+ const GLint ATMOSPHERE_GPU_SLOT = 4;
516518 loc = glGetUniformBlockIndex(program.programId(), "atmosphereBufferUnit");
517519 if (loc >= 0) {
518− glUniformBlockBinding(program.programId(), loc, 4);
519− locations.atmosphereBufferUnit = 4;
520+ glUniformBlockBinding(program.programId(), loc, ATMOSPHERE_GPU_SLOT);
521+ locations.atmosphereBufferUnit = ATMOSPHERE_GPU_SLOT;
520522 } else {
521523 locations.atmosphereBufferUnit = -1;
522524 }