diff --git a/Source/Native/OpenGL/OpenGLContext.cpp b/Source/Native/OpenGL/OpenGLContext.cpp index ae34a0ed..0989e91b 100644 --- a/Source/Native/OpenGL/OpenGLContext.cpp +++ b/Source/Native/OpenGL/OpenGLContext.cpp @@ -229,9 +229,11 @@ OpenGLCreationHelper::OpenGLCreationHelper(HWND window) : window(window) memset(&pfd, 0, sizeof(PIXELFORMATDESCRIPTOR)); pfd.nSize = sizeof(PIXELFORMATDESCRIPTOR); pfd.nVersion = 1; - pfd.dwFlags = PFD_DRAW_TO_WINDOW | PFD_SUPPORT_OPENGL; + pfd.dwFlags = PFD_DRAW_TO_WINDOW | PFD_SUPPORT_OPENGL | PFD_DOUBLEBUFFER; pfd.iPixelType = PFD_TYPE_RGBA; - pfd.cColorBits = 24; + pfd.cColorBits = 32; + pfd.cDepthBits = 16; + pfd.cStencilBits = 8; int pixelformat = ChoosePixelFormat(query_dc, &pfd); SetPixelFormat(query_dc, pixelformat, &pfd); @@ -264,13 +266,10 @@ HGLRC OpenGLCreationHelper::CreateContext(HDC hdc, HGLRC share_context) pfd.nVersion = 1; pfd.dwFlags = PFD_DRAW_TO_WINDOW | PFD_SUPPORT_OPENGL | PFD_DOUBLEBUFFER; pfd.iPixelType = PFD_TYPE_RGBA; - pfd.cColorBits = 24; - pfd.cRedBits = 8; - pfd.cGreenBits = 8; - pfd.cBlueBits = 8; - pfd.cAlphaBits = 8; - pfd.cDepthBits = 24; + pfd.cColorBits = 32; + pfd.cDepthBits = 16; pfd.cStencilBits = 8; + int pixelformat = ChoosePixelFormat(hdc, &pfd); SetPixelFormat(hdc, pixelformat, &pfd);