[Bf-blender-cvs] [b3df9f4] decklink: WGL: fix minor error in previous patch.
Benoit Bolsee
noreply at git.blender.org
Sat Jun 20 14:09:33 CEST 2015
Commit: b3df9f4407d41af0375178501b8de4ff562e429e
Author: Benoit Bolsee
Date: Sat Jun 20 14:07:57 2015 +0200
Branches: decklink
https://developer.blender.org/rBb3df9f4407d41af0375178501b8de4ff562e429e
WGL: fix minor error in previous patch.
===================================================================
M intern/ghost/intern/GHOST_ContextWGL.cpp
===================================================================
diff --git a/intern/ghost/intern/GHOST_ContextWGL.cpp b/intern/ghost/intern/GHOST_ContextWGL.cpp
index ffba39f..7c8d574 100644
--- a/intern/ghost/intern/GHOST_ContextWGL.cpp
+++ b/intern/ghost/intern/GHOST_ContextWGL.cpp
@@ -577,7 +577,7 @@ int GHOST_ContextWGL::_choose_pixel_format_arb_2(
"Substituting one that uses %d samples.\n",
numOfAASamples, actualSamples);
- m_numOfAASamples = actualSamples; // set context property to actual value
+ numOfAASamples = actualSamples; // set context property to actual value
}
if (needAlpha) {
iQuery[0] = WGL_ALPHA_BITS_ARB;
@@ -588,7 +588,9 @@ int GHOST_ContextWGL::_choose_pixel_format_arb_2(
}
}
}
- numOfAASamples = samples;
+ else {
+ numOfAASamples = 0;
+ }
return iPixelFormat;
}
@@ -626,26 +628,30 @@ int GHOST_ContextWGL::_choose_pixel_format_arb_1(
exchPixelFormat = _choose_pixel_format_arb_2(
stereoVisual, exchNumOfAASamples, needAlpha, needStencil, sRGB, swapMethodOut);
if (exchPixelFormat == 0 || exchNumOfAASamples < numOfAASamples) {
- // the number of AA samples cannot be me, take the highest
- if (exchNumOfAASamples > undefNumOfAASamples) {
- undefNumOfAASamples = exchNumOfAASamples;
- undefPixelFormat = exchPixelFormat;
+ // the number of AA samples cannot be met, take the highest
+ if (undefPixelFormat != 0 && undefNumOfAASamples >= exchNumOfAASamples) {
+ exchNumOfAASamples = undefNumOfAASamples;
+ exchPixelFormat = undefPixelFormat;
+ swapMethodOut = WGL_SWAP_UNDEFINED_ARB;
}
- if (undefNumOfAASamples > copyNumOfAASamples) {
- copyNumOfAASamples = undefNumOfAASamples;
- copyPixelFormat = undefPixelFormat;
+ if (copyPixelFormat != 0 && copyNumOfAASamples >= exchNumOfAASamples) {
+ exchNumOfAASamples = copyNumOfAASamples;
+ exchPixelFormat = copyPixelFormat;
+ swapMethodOut = WGL_SWAP_COPY_ARB;
}
- iPixelFormat = copyPixelFormat;
}
- else
- iPixelFormat = exchPixelFormat;
+ iPixelFormat = exchPixelFormat;
+ m_numOfAASamples = exchNumOfAASamples;
}
- else
+ else {
iPixelFormat = undefPixelFormat;
+ m_numOfAASamples = undefNumOfAASamples;
+ }
}
- else
+ else {
iPixelFormat = copyPixelFormat;
-
+ m_numOfAASamples = copyNumOfAASamples;
+ }
return iPixelFormat;
}
More information about the Bf-blender-cvs
mailing list