libobs-opengl: Disable v-sync on mac

Sets the swap interval to 0 to prevent v-sync from affecting any of the
preview panes on mac.
This commit is contained in:
jp9000
2017-10-06 06:35:07 -07:00
parent 3399f7b822
commit 4494e927f7

View File

@@ -73,12 +73,14 @@ static NSOpenGLContext *gl_context_create(void)
struct gl_platform *gl_platform_create(gs_device_t *device, uint32_t adapter)
{
struct gl_platform *plat = bzalloc(sizeof(struct gl_platform));
GLint interval = 0;
plat->context = gl_context_create();
if (!plat->context)
goto fail;
[plat->context makeCurrentContext];
[plat->context setValues:&interval forParameter:NSOpenGLCPSwapInterval];
if (!gladLoadGL())
goto fail;