[mtl surface] Allow setting swap interval to 0. Note however that vsync needs to be turned off at the OS level for that to work smoothly. Otherwise, we get jittery frame rate with stalls when we run off of drawables (I suppose? should investigate some more).
This can be done with Quart Debugger in Additional Tools for XCode.
This commit is contained in:
parent
716bdc53d4
commit
7c58145524
|
@ -193,14 +193,14 @@ int main()
|
|||
mg_set_font(font);
|
||||
mg_set_font_size(12);
|
||||
mg_move_to(50, 600-50);
|
||||
|
||||
/*
|
||||
str8 text = str8_pushf(mem_scratch(),
|
||||
"Milepost vector graphics test program (frame time = %fs, fps = %f)...",
|
||||
frameTime,
|
||||
1./frameTime);
|
||||
mg_text_outlines(text);
|
||||
mg_fill();
|
||||
|
||||
*/
|
||||
printf("Milepost vector graphics test program (frame time = %fs, fps = %f)...\n",
|
||||
frameTime,
|
||||
1./frameTime);
|
||||
|
|
|
@ -120,10 +120,10 @@ void mg_mtl_surface_present(mg_surface_data* interface)
|
|||
void mg_mtl_surface_swap_interval(mg_surface_data* interface, int swap)
|
||||
{
|
||||
mg_mtl_surface* surface = (mg_mtl_surface*)interface;
|
||||
|
||||
////////////////////////////////////////////////////////////////
|
||||
//TODO
|
||||
////////////////////////////////////////////////////////////////
|
||||
@autoreleasepool
|
||||
{
|
||||
[surface->mtlLayer setDisplaySyncEnabled: (swap ? YES : NO)];
|
||||
}
|
||||
}
|
||||
|
||||
void mg_mtl_surface_set_frame(mg_surface_data* interface, mp_rect frame)
|
||||
|
|
Loading…
Reference in New Issue