diff options
author | Dalai Felinto <dfelinto@gmail.com> | 2013-02-22 11:37:17 +0400 |
---|---|---|
committer | Dalai Felinto <dfelinto@gmail.com> | 2013-02-22 11:37:17 +0400 |
commit | 1cdaf1e3293b6bf641a9b9117a8bcef9364b7d85 (patch) | |
tree | 7a7be075c9dc3be18d51e41544512235e5824db9 /intern/ghost/intern/GHOST_WindowWin32.cpp | |
parent | 4aea4c2cb3a48580ff821efea92d5503e24594d7 (diff) |
bge bugfix: [#18967] alpha value is never available in the color buffer by Campbell Barton (X11) and me (Win32)
This is and old patch (June, 2009). The reason it never made into trunk it's that we (me at least) thought that
it should be optional, as a ui or command-line option.
However, it seems that OSX always have the OpenGL context with alpha enabled. So I think it's consistent to
have the other OSs to follow.
The main usage of this is the BGE (or more specifically people using BGE for TV broadcasting) but I think
pydevs can have their share of fun with it in Blender as well.
Diffstat (limited to 'intern/ghost/intern/GHOST_WindowWin32.cpp')
-rw-r--r-- | intern/ghost/intern/GHOST_WindowWin32.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/intern/ghost/intern/GHOST_WindowWin32.cpp b/intern/ghost/intern/GHOST_WindowWin32.cpp index bf429527199..93f9ccbf1eb 100644 --- a/intern/ghost/intern/GHOST_WindowWin32.cpp +++ b/intern/ghost/intern/GHOST_WindowWin32.cpp @@ -712,6 +712,7 @@ GHOST_TSuccess GHOST_WindowWin32::initMultisample(PIXELFORMATDESCRIPTOR pfd) WGL_ACCELERATION_ARB, WGL_FULL_ACCELERATION_ARB, WGL_COLOR_BITS_ARB, pfd.cColorBits, WGL_DEPTH_BITS_ARB, pfd.cDepthBits, + WGL_ALPHA_BITS_ART, pfd.cAlphaBits, WGL_STENCIL_BITS_ARB, pfd.cStencilBits, WGL_DOUBLE_BUFFER_ARB, GL_TRUE, WGL_SAMPLE_BUFFERS_ARB, GL_TRUE, @@ -1321,6 +1322,9 @@ static int WeightPixelFormat(PIXELFORMATDESCRIPTOR& pfd) weight += pfd.cColorBits - 8; + if (pdf.cAlphaBits > 0) + weight ++; + /* want swap copy capability -- it matters a lot */ if (pfd.dwFlags & PFD_SWAP_COPY) weight += 16; |