[Bf-committers] Back Buffer Issues
Matthew H. Plough
mplough at Princeton.EDU
Mon Dec 13 19:05:58 CET 2004
Hi everyone --
A long, long time ago, Ton Roosendaal wrote:
> I also would be interested to find out what these "many other cards"
> is... probably more in the professional market? On all reports we had
> in until now, this effect was only a problem for Sun Solaris.
I had said that many other cards on the market do both swap exchange and
swap copy. After looking at some friends' advanced display settings, it
looks like not many cards on the market do page flipping, or at least,
they don't provide a setting for it. A lot of older cards that are
still in use do, though (Wildcat VP, TNT2, for instance).
On http://www.zuster.org/blender/drawingArchitecture.html , Daniel
Dunbar wrote:
>Windows provides a flag to *request* swap-copy behavior when obtaining an OpenGL
>context, but this is just a hint, and it is not clear if it is possible to confirm
>that the context returned actually does follow swap-copy behavior.
>
It seems that it is possible to check; I have patched
blender/intern/ghost/intern/GHOST_WindowWin32.cpp to perform that
check. While the result works on my computer, further testing will be
necessary to see if it applies in general.
Matt
The patch follows:
Index: intern/ghost/intern/GHOST_WindowWin32.cpp
===================================================================
RCS file:
/cvsroot/bf-blender/blender/intern/ghost/intern/GHOST_WindowWin32.cpp,v
retrieving revision 1.10
diff -u -r1.10 GHOST_WindowWin32.cpp
--- intern/ghost/intern/GHOST_WindowWin32.cpp 28 Dec 2003 20:24:32
-0000 1.10
+++ intern/ghost/intern/GHOST_WindowWin32.cpp 13 Dec 2004 17:50:06 -0000
@@ -409,6 +409,11 @@
// For debugging only: retrieve the pixel format chosen
PIXELFORMATDESCRIPTOR preferredFormat;
::DescribePixelFormat(m_hDC, iPixelFormat,
sizeof(PIXELFORMATDESCRIPTOR), &preferredFormat);
+
+ if(preferredFormat.dwFlags & PFD_SWAP_COPY)
+ ::printf("Using swap copy double buffering mode.\n");
+ else ::printf("Not using swap copy double buffering mode.
Blender UI corruption may occur.\n");
+
// Create the context
m_hGlRc = ::wglCreateContext(m_hDC);
if (m_hGlRc) {
More information about the Bf-committers
mailing list