add timelapse video generation on iOS and mac , fix history memory
This commit is contained in:
@@ -374,6 +374,10 @@ NSThread* lock_thread;
|
||||
|
||||
- (void)glkView:(GLKView *)view drawInRect:(CGRect)rect
|
||||
{
|
||||
static auto time = std::chrono::steady_clock::now();
|
||||
auto now = std::chrono::steady_clock::now();
|
||||
auto dt = std::chrono::duration<float>(now - time);
|
||||
|
||||
[gl_lock lock];
|
||||
if (!(App::I.redraw || App::I.animate))
|
||||
{
|
||||
@@ -384,9 +388,10 @@ NSThread* lock_thread;
|
||||
[EAGLContext setCurrentContext:self.context];
|
||||
[view bindDrawable];
|
||||
App::I.clear();
|
||||
App::I.update(0);
|
||||
App::I.update(dt.count());
|
||||
[self.context presentRenderbuffer:GL_FRAMEBUFFER];
|
||||
[gl_lock unlock];
|
||||
time = now;
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
Reference in New Issue
Block a user