Don't create a depth/stencil buffer for the default frame buffer

This commit is contained in:
Magnus Norddahl 2020-09-19 15:01:10 +02:00
parent dbafb36abf
commit 77fd7da6c7

View file

@ -233,8 +233,8 @@ OpenGLCreationHelper::OpenGLCreationHelper(HWND window) : window(window)
pfd.dwFlags = PFD_DRAW_TO_WINDOW | PFD_SUPPORT_OPENGL | PFD_DOUBLEBUFFER; pfd.dwFlags = PFD_DRAW_TO_WINDOW | PFD_SUPPORT_OPENGL | PFD_DOUBLEBUFFER;
pfd.iPixelType = PFD_TYPE_RGBA; pfd.iPixelType = PFD_TYPE_RGBA;
pfd.cColorBits = 32; pfd.cColorBits = 32;
pfd.cDepthBits = 16; //pfd.cDepthBits = 16;
pfd.cStencilBits = 8; //pfd.cStencilBits = 8;
int pixelformat = ChoosePixelFormat(query_dc, &pfd); int pixelformat = ChoosePixelFormat(query_dc, &pfd);
SetPixelFormat(query_dc, pixelformat, &pfd); SetPixelFormat(query_dc, pixelformat, &pfd);
@ -268,8 +268,8 @@ HGLRC OpenGLCreationHelper::CreateContext(HDC hdc, HGLRC share_context)
pfd.dwFlags = PFD_DRAW_TO_WINDOW | PFD_SUPPORT_OPENGL | PFD_DOUBLEBUFFER; pfd.dwFlags = PFD_DRAW_TO_WINDOW | PFD_SUPPORT_OPENGL | PFD_DOUBLEBUFFER;
pfd.iPixelType = PFD_TYPE_RGBA; pfd.iPixelType = PFD_TYPE_RGBA;
pfd.cColorBits = 32; pfd.cColorBits = 32;
pfd.cDepthBits = 16; //pfd.cDepthBits = 16;
pfd.cStencilBits = 8; //pfd.cStencilBits = 8;
int pixelformat = ChoosePixelFormat(hdc, &pfd); int pixelformat = ChoosePixelFormat(hdc, &pfd);
SetPixelFormat(hdc, pixelformat, &pfd); SetPixelFormat(hdc, pixelformat, &pfd);