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:
@@ -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;
|
||||
|
Reference in New Issue
Block a user