Skip to content

Commit

Permalink
Adjust modules update orders.
Browse files Browse the repository at this point in the history
  • Loading branch information
scottcgi committed Apr 4, 2019
1 parent 7733ee4 commit deba330
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Engine/Application/Application.c
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,10 @@ static void Loop()
float deltaSeconds = (float) ((now.tv_nsec - last.tv_nsec) * 0.000000001 + (now.tv_sec - last.tv_sec));
last = now;

APhysicsWorld->Update(deltaSeconds);
ATween ->Update(deltaSeconds);
AScheduler ->Update(deltaSeconds);
ACoroutine ->Update(deltaSeconds);
ATween ->Update(deltaSeconds);
APhysicsWorld->Update(deltaSeconds);
AAudio ->Update(deltaSeconds);

// root update
Expand Down
3 changes: 3 additions & 0 deletions Engine/Graphics/Draw/Drawable.h
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,9 @@ struct Drawable
* Custom draw for preparing rendering data.
* called by ADrawable's Draw, do not use any openGL command,
* and can check any state change.
*
* if called in Scheduler or Coroutine may have draw order problem,
* because the draw oder common controlled by Component.
*/
void (*Draw) (Drawable* drawable);

Expand Down

0 comments on commit deba330

Please sign in to comment.