Chris,
Thanks a lot for your clarification. As stated previously, I'll
repent publicly for relying on undefined behaviour. The curious
thing is that the backbuffer issue affects both Leopard and Vista...
Should I use the flag in any case, or it is enough to specify it
when running on Leopard? Our application cannot lose Tiger
compatibility...
Thank you and ciao,
Dario
On 7 Nov 2007, at 23:58, Chris Niederauer wrote:
Hi Dario,
That is a great question. The answer is that in Leopard, one of
NSOpenGLPFABackingStore (NSOpenGL), AGL_BACKING_STORE (AGL), or
kCGLPFABackingStore (CGL) is now required in order to preserve the
contents of the back buffer after a call to swap the buffers.
Technically, this has always been the case, but there were much
fewer situations that needed it as it the undefined behavior would
not lose back buffer contents most of the time. All applications
that were built before Leopard should work fine until building
again on Leopard, so Leopard's backwards compatibility with older
binaries is not an issue.
Documentation is being updated and put up on developer.apple.com
real soon now™ on this subject.
Chris
On Nov 7, 2007, at 2:10 PM, Dario Accornero wrote:
Hello,
I have just upgraded a dual G4 machine (with a Radeon 9800 card)
from 10.4.10 to 10.5, and was eager to try out one of our GL
products (which requires Tiger). This is a Carbon, windowed AGL
application: it runs fine in Tiger, on Intel, ATi and nVidia cards.
Our display methodology requires the backbuffer to be intact
between subsequent calls to SwapBuffers (we only redraw the parts
that have actually changed): we've had no problems with this
approach so far (the Windows port works the same way, but it sets
a specific WGL flag for Vista).
However, it looks like this scheme is no longer valid in Leopard
(at least on ATi -- we haven't upgraded the other machines yet):
apparently the backbuffer does change between calls to SwapBuffers.
Can anyone confirm this? If so, is there any AGL/CGL setting to
use the pre-Leopard behaviour?
Thank you,
Dario