Explorar el Código

Fix Shader:send and sendColor ignoring the last argument for shader uniform arrays.

Alex Szpakowski hace 9 años
padre
commit
b084934311
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      src/modules/graphics/opengl/wrap_Shader.cpp

+ 1 - 1
src/modules/graphics/opengl/wrap_Shader.cpp

@@ -48,7 +48,7 @@ int w_Shader_getWarnings(lua_State *L)
 
 
 static int _getCount(lua_State *L, int startidx, const Shader::UniformInfo *info)
 static int _getCount(lua_State *L, int startidx, const Shader::UniformInfo *info)
 {
 {
-	return std::min(std::max(lua_gettop(L) - startidx, 1), info->count);
+	return std::min(std::max(lua_gettop(L) - startidx + 1, 1), info->count);
 }
 }
 
 
 template <typename T>
 template <typename T>