From ee6f2613a8cd1a115fd7462cf477735fb20d7253 Mon Sep 17 00:00:00 2001 From: Henrik Rydgard Date: Tue, 27 Aug 2013 16:23:46 +0200 Subject: [PATCH] Win32: Ask for destination alpha in the OpenGL context. Fixes some issues in non-buffered rendering, see #3436. This apparently still happens on Android so will need to fix it separately there. --- Windows/OpenGLBase.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Windows/OpenGLBase.cpp b/Windows/OpenGLBase.cpp index f75564206a..e67e77ccbd 100644 --- a/Windows/OpenGLBase.cpp +++ b/Windows/OpenGLBase.cpp @@ -91,6 +91,8 @@ bool GL_Init(HWND window, std::string *error_message) { hWnd = window; GLuint PixelFormat; + // TODO: Change to use WGL_ARB_pixel_format instead + static const PIXELFORMATDESCRIPTOR pfd = { sizeof(PIXELFORMATDESCRIPTOR), // Size Of This Pixel Format Descriptor 1, // Version Number @@ -98,9 +100,9 @@ bool GL_Init(HWND window, std::string *error_message) { PFD_SUPPORT_OPENGL | // Format Must Support OpenGL PFD_DOUBLEBUFFER, // Must Support Double Buffering PFD_TYPE_RGBA, // Request An RGBA Format - 32, // Select Our Color Depth + 24, // Select Our Color Depth 0, 0, 0, 0, 0, 0, // Color Bits Ignored - 0, // No Alpha Buffer + 8, // No Alpha Buffer 0, // Shift Bit Ignored 0, // No Accumulation Buffer 0, 0, 0, 0, // Accumulation Bits Ignored