OGL: Support Quad-Buffered stereoscopy.

This commit is contained in:
Jules Blok
2017-06-26 12:32:09 +02:00
parent 2ab068d3f2
commit f3508742ac
13 changed files with 35 additions and 18 deletions

View File

@ -51,12 +51,15 @@ void cInterfaceAGL::Swap()
// Create rendering window.
// Call browser: Core.cpp:EmuThread() > main.cpp:Video_Initialize()
bool cInterfaceAGL::Create(void* window_handle, bool core)
bool cInterfaceAGL::Create(void* window_handle, bool stereo, bool core)
{
NSOpenGLPixelFormatAttribute attr[] = {NSOpenGLPFADoubleBuffer, NSOpenGLPFAOpenGLProfile,
core ? NSOpenGLProfileVersion3_2Core :
NSOpenGLProfileVersionLegacy,
NSOpenGLPFAAccelerated, 0};
NSOpenGLPixelFormatAttribute attr[] = {
NSOpenGLPFADoubleBuffer,
NSOpenGLPFAOpenGLProfile,
core ? NSOpenGLProfileVersion3_2Core : NSOpenGLProfileVersionLegacy,
NSOpenGLPFAAccelerated,
stereo ? NSOpenGLPFAStereo : static_cast<NSOpenGLPixelFormatAttribute>(0),
0};
NSOpenGLPixelFormat* fmt = [[NSOpenGLPixelFormat alloc] initWithAttributes:attr];
if (fmt == nil)
{