Skip to content

Commit

Permalink
hacky fix for stuttering
Browse files Browse the repository at this point in the history
  • Loading branch information
wheybags committed Aug 2, 2015
1 parent 13d7a36 commit 4c34fe2
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 8 deletions.
7 changes: 1 addition & 6 deletions apps/freeablo/engine/threadmanager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,6 @@ namespace Engine

if(!renderer->renderFrame(mRenderState))
break;

if(mRenderState)
mRenderState->ready = true;

mRenderState = NULL;
}

renderer->cleanup();
Expand Down Expand Up @@ -93,7 +88,7 @@ namespace Engine

case renderState:
{
if(mRenderState)
if (mRenderState && mRenderState != message.data.renderState)
mRenderState->ready = true;

mRenderState = message.data.renderState;
Expand Down
2 changes: 1 addition & 1 deletion apps/freeablo/farender/renderer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ namespace FARender

RenderState* Renderer::getFreeState()
{
for(size_t i = 0; i < 3; i++)
for(size_t i = 0; i < 15; i++)
{
if(mStates[i].ready)
{
Expand Down
2 changes: 1 addition & 1 deletion apps/freeablo/farender/renderer.h
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ namespace FARender
boost::atomic<bool> mDone;
Render::LevelObjects mLevelObjects;

RenderState mStates[3];
RenderState mStates[15];

Rocket::Core::Context* mRocketContext;

Expand Down

0 comments on commit 4c34fe2

Please sign in to comment.