Browse Source

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

Alex Szpakowski 8 years ago
parent
commit
b084934311
1 changed files with 1 additions and 1 deletions
  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>