Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'intern/ghost/intern/GHOST_WindowWin32.cpp')
-rw-r--r--intern/ghost/intern/GHOST_WindowWin32.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/intern/ghost/intern/GHOST_WindowWin32.cpp b/intern/ghost/intern/GHOST_WindowWin32.cpp
index aae1509fda1..b69f8fb6a45 100644
--- a/intern/ghost/intern/GHOST_WindowWin32.cpp
+++ b/intern/ghost/intern/GHOST_WindowWin32.cpp
@@ -98,7 +98,11 @@ static PIXELFORMATDESCRIPTOR sPreferredFormat = {
0, /* no accumulation buffer */
0, 0, 0, 0, /* accum bits (ignored) */
32, /* depth buffer */
+#ifdef WITH_ONSURFACEBRUSH
+ 8, /* stencil buffer */
+#else
0, /* no stencil buffer */
+#endif
0, /* no auxiliary buffers */
PFD_MAIN_PLANE, /* main layer */
0, /* reserved */
@@ -1281,6 +1285,11 @@ static int WeightPixelFormat(PIXELFORMATDESCRIPTOR& pfd) {
!(pfd.dwFlags & PFD_DOUBLEBUFFER) || /* Blender _needs_ this */
( pfd.cDepthBits <= 8 ) ||
!(pfd.iPixelType == PFD_TYPE_RGBA))
+ !(pfd.iPixelType == PFD_TYPE_RGBA)
+#ifdef WITH_ONSURFACEBRUSH
+ || ( pfd.cStencilBits == 0)
+#endif
+ )
return 0;
weight = 1; /* it's usable */