ADC Home > Reference Library > Technical Q&As > QuickTime > Movie Basics >

Using SetMovieGWorld to draw to the window back buffer


Q: I'm using QuickTime to draw movie frames into an offscreen buffer, at which point I draw my own graphics over them and blit them to the screen. I want to change my code so I instead draw to the window's back buffer on Mac OS X rather than to an offscreen. Can I use SetMovieGWorld to draw to the back buffer?

A: You can use the SetMovieGWorld function to draw to the window's back buffer. However, in order for this to work you must first turn off hardware acceleration for your movie. You can turn off hardware acceleration for your movie via the QuickTime movie toolbox SetMoviePlayHints function as shown in listing 1:



    SetMoviePlayHints(myMovie, hintsDontUseVideoOverlaySurface,
                      hintsDontUseVideoOverlaySurface);

Listing 1. Using SetMoviePlayHints.



On Mac OS X, QuickTime will avoid the back buffer if it can (instead going through hardware acceleration) which means that you can't then draw "on top" of the video. This is also true on Mac OS 9.


[Jun 26 2001]


Did this document help you?
Yes: Tell us what works for you.
It’s good, but: Report typos, inaccuracies, and so forth.
It wasn’t helpful: Tell us what would have helped.