浏览代码

Fixing bug #4. Thanks ksmk

Panagiotis Christopoulos Charitos 9 年之前
父节点
当前提交
2a9e43ecc7
共有 2 个文件被更改,包括 3 次插入3 次删除
  1. 2 2
      include/anki/gr/Pipeline.h
  2. 1 1
      src/core/App.cpp

+ 2 - 2
include/anki/gr/Pipeline.h

@@ -143,7 +143,7 @@ public:
 class PipelineInitInfo : public PipelineInitInfoState
 class PipelineInitInfo : public PipelineInitInfoState
 {
 {
 public:
 public:
-	Array<ShaderPtr, 6> m_shaders;
+	Array<ShaderPtr, U(ShaderType::COUNT)> m_shaders;
 
 
 	U64 computeHash() const
 	U64 computeHash() const
 	{
 	{
@@ -151,7 +151,7 @@ public:
 			anki::computeHash(static_cast<const PipelineInitInfoState*>(this),
 			anki::computeHash(static_cast<const PipelineInitInfoState*>(this),
 				sizeof(PipelineInitInfoState));
 				sizeof(PipelineInitInfoState));
 
 
-		Array<U64, m_shaders.getSize()> uuids;
+		Array<U64, U(ShaderType::COUNT)> uuids;
 		for(U i = 0; i < m_shaders.getSize(); ++i)
 		for(U i = 0; i < m_shaders.getSize(); ++i)
 		{
 		{
 			U64 uuid = (m_shaders[i].isCreated()) ? m_shaders[i]->getUuid() : 0;
 			U64 uuid = (m_shaders[i].isCreated()) ? m_shaders[i]->getUuid() : 0;

+ 1 - 1
src/core/App.cpp

@@ -403,7 +403,7 @@ Error App::mainLoop()
 		timer.stop();
 		timer.stop();
 		if(timer.getElapsedTime() < m_timerTick)
 		if(timer.getElapsedTime() < m_timerTick)
 		{
 		{
-			HighRezTimer::sleep(getTimerTick() - timer.getElapsedTime());
+			HighRezTimer::sleep(m_timerTick - timer.getElapsedTime());
 		}
 		}
 
 
 		++m_globalTimestamp;
 		++m_globalTimestamp;