Skip to content

Commit

Permalink
Fixed: Bug on delta time being a big number in the first frame
Browse files Browse the repository at this point in the history
  • Loading branch information
MrcSnm committed Dec 7, 2023
1 parent a0c4b34 commit addeccc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 2 additions & 0 deletions build/appleos/HipremeEngine Shared/Renderer.m
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ - (void)_loadMetalWithView:(nonnull MTKView *)view;
- (void)drawInMTKView:(nonnull MTKView *)view
{
/// Per frame updates here
if(lastTimeStamp == 0)
lastTimeStamp = CACurrentMediaTime();
CFTimeInterval timeNow = CACurrentMediaTime();
CFTimeInterval dt = timeNow - lastTimeStamp;
lastTimeStamp = timeNow;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,6 @@ class HipMTLVertexBuffer : IHipVertexBufferImpl

void updateData(int offset, const void[] data)
{
import hip.console.log;
hiplog("Update buffer[",offset,"..",offset+data.length,"]", " ", HipRenderer.getStatistics().renderFrames);
buffer.contents[offset..offset+data.length] = data[];
}
}
Expand Down

0 comments on commit addeccc

Please sign in to comment.