revert (ifdef) r54745. which enbabled alpha in the GL buffer.
authorCampbell Barton <ideasman42@gmail.com>
Sun, 19 May 2013 11:39:22 +0000 (11:39 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Sun, 19 May 2013 11:39:22 +0000 (11:39 +0000)
looks to be the cause of bug [#35415]

we can make this optional.

intern/ghost/intern/GHOST_WindowWin32.cpp
intern/ghost/intern/GHOST_WindowX11.cpp

index 3871ececee82fd3ab2bf8c6a687816dac7ee6c0f..2d3997cdc141e10bf5f886d87c6122690feb13f6 100644 (file)
@@ -692,7 +692,9 @@ 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,
+#ifdef GHOST_OPENGL_ALPHA
                WGL_ALPHA_BITS_ARB, pfd.cAlphaBits,
+#endif
                WGL_STENCIL_BITS_ARB, pfd.cStencilBits,
                WGL_DOUBLE_BUFFER_ARB, GL_TRUE,
                WGL_SAMPLE_BUFFERS_ARB, GL_TRUE,
@@ -1302,8 +1304,10 @@ static int WeightPixelFormat(PIXELFORMATDESCRIPTOR& pfd)
 
        weight += pfd.cColorBits - 8;
 
+#ifdef GHOST_OPENGL_ALPHA
        if (pfd.cAlphaBits > 0)
                weight ++;
+#endif
 
        /* want swap copy capability -- it matters a lot */
        if (pfd.dwFlags & PFD_SWAP_COPY) weight += 16;
index 20855a126a8cae04cac61c5c72c16d767d83de15..25d7c181b68b0e0152914cbc4a27f061030c6e72 100644 (file)
@@ -211,7 +211,9 @@ GHOST_WindowX11(
                attributes[i++] = GLX_BLUE_SIZE;  attributes[i++] = 1;
                attributes[i++] = GLX_GREEN_SIZE; attributes[i++] = 1;
                attributes[i++] = GLX_DEPTH_SIZE; attributes[i++] = 1;
+#ifdef GHOST_OPENGL_ALPHA
                attributes[i++] = GLX_ALPHA_SIZE; attributes[i++] = 1;
+#endif
                /* GLX >= 1.4 required for multi-sample */
                if (samples && (glxVersionMajor >= 1) && (glxVersionMinor >= 4)) {
                        attributes[i++] = GLX_SAMPLE_BUFFERS; attributes[i++] = 1;