AcademySoftwareFoundation / OpenColorIO

A color management framework for visual effects and animation.
https://opencolorio.org
BSD 3-Clause "New" or "Revised" License
1.78k stars 455 forks source link

OpenGLBuilder::allocateAllTextures() wastes one index #548

Closed pjurkas closed 6 years ago

pjurkas commented 6 years ago

Is there a reason why OpenGLBuilder::allocateAllTextures() increments the startIndex at the very beginning? It seems that the index is wasted.

diff --git a/src/lang-glsl/glsl.cpp b/src/lang-glsl/glsl.cpp
index 3cffde8..1a66897 100644
--- a/src/lang-glsl/glsl.cpp
+++ b/src/lang-glsl/glsl.cpp
@@ -230,7 +230,7 @@ void OpenGLBuilder::allocateAllTextures(unsigned startIndex)
 {
     deleteAllTextures();

-    m_startIndex = startIndex + 1;
+    m_startIndex = startIndex;
     unsigned currIndex = m_startIndex;

     // Process the 3D Luts first
hodoulp commented 6 years ago

Merged