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

@ -200,7 +200,7 @@ bool cInterfaceWGL::PeekMessages()
// Create rendering window.
// Call browser: Core.cpp:EmuThread() > main.cpp:Video_Initialize()
bool cInterfaceWGL::Create(void* window_handle, bool core)
bool cInterfaceWGL::Create(void* window_handle, bool stereo, bool core)
{
if (!window_handle)
return false;
@ -219,12 +219,14 @@ bool cInterfaceWGL::Create(void* window_handle, bool core)
s_backbuffer_width = twidth;
s_backbuffer_height = theight;
static constexpr PIXELFORMATDESCRIPTOR pfd = {
const DWORD stereo_flag = stereo ? PFD_STEREO : 0;
static const PIXELFORMATDESCRIPTOR pfd = {
sizeof(PIXELFORMATDESCRIPTOR), // Size Of This Pixel Format Descriptor
1, // Version Number
PFD_DRAW_TO_WINDOW | // Format Must Support Window
PFD_SUPPORT_OPENGL | // Format Must Support OpenGL
PFD_DOUBLEBUFFER, // Must Support Double Buffering
PFD_DOUBLEBUFFER | // Must Support Double Buffering
stereo_flag, // Could Support Quad Buffering
PFD_TYPE_RGBA, // Request An RGBA Format
32, // Select Our Color Depth
0,