libobs-opengl: Only flush if no active swap on OSX
glFlush is somewhat implementation-specific; on OSX for example, it is additionally used to draw to a view. However, we're already using the Objective-C function flushBuffer, which apparently calls glFlush internally anyway to draw to views. That means that we're superfluously calling glFlush most of the time if there's an active swap chain. So instead, only call glFlush when there are no active swap chains on OSX.
This commit is contained in:
parent
de65407ac4
commit
05a191618f
@ -1051,7 +1051,12 @@ void device_clear(gs_device_t *device, uint32_t clear_flags,
|
||||
|
||||
void device_flush(gs_device_t *device)
|
||||
{
|
||||
#ifdef __APPLE__
|
||||
if (!device->cur_swap)
|
||||
glFlush();
|
||||
#else
|
||||
glFlush();
|
||||
#endif
|
||||
|
||||
UNUSED_PARAMETER(device);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user