Bink SDK 1.5v |
Video playback on the Nintendo GameCube is pretty easy compared to a PC or Mac - the hardware is damn fast and, most importantly, it is constant. If it plays back perfectly on your machine, then it will on everyone else's too! You have a couple options for blitting the video frames onto the screen with a GameCube - copying to the back buffer, or copying to a texture and then rendering. The simplest way is definitely the back buffer option - just have Bink copy its YUV data directly to your screen's YUV back buffer. This is also the highest performance method, because not only do you keep the renderer out of the loop, but Bink doesn't even have to convert from its internal YUV format. Very fast, very simple. See the "ExamNbb.C" for an example of this kind of playback. The more flexible option is to have Bink copy into a texture, and then render that texture onto the screen. This lets you do all kinds of sophisticated stuff like alpha transluncency, animated textures, video in a window with 3D objects in the scene, etc. The GameCube's texture formats are nice and simple. First off, they can be non-power-of-2 which is really nice for video. However, they do have to be swizzled to the GPU's internal format (which is usually painful). Fortunately, the BinkCopyToBuffer functions, automatically swizzle the pixels as it converts its YUV data into the RGB destination. That means you simply need to call BinkCopyToBuffer to move the pixels from Bink's YUV buffers into your RGB texture and your texture is ready! Note that due to the swizzled output, you must use divisible-by-four values for the X offset, Y offset, width, and height parameters in BinkCopyToBuffer on the GameCube. See the "ExamNTex.C" for an example of this kind of playback.
Next Topic (NTSC and PAL on the Nintendo GameCube)
Previous Topic (Distributing Bink on the Nintendo GameCube)
Group:
The Nintendo GameCube Platform
Related Sections:
Alpha Planes
Related Functions:
BinkCopyToBuffer
For technical support, e-mail Bink1@radgametools.com
© Copyright 1994-2003 RAD Game Tools, Inc. All Rights Reserved.