소스 검색

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

Alex Szpakowski 8 년 전
부모
커밋
b084934311
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  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)
 {
-	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>