Friday, February 24th, 2012 at
8:49 am
Action that has the ’3D’ suffix in their names, means that they produce a 3D visual effects by modifying the z-coordinate of the grid.
If you’re going to use any ’3D’ action, probably you will want to use the depth buffer. An easy way to do that is by calling:
// IMPORTANT: Call this function at the very beginning, before running your 1st scene
// Create a depth buffer of 24 bits
// These means that openGL z-order will be taken into account
|
|
[[CCDirector sharedDirector] setDepthBufferFormat:kDepthBuffer16]; |
And under some circumstances, you might also want to set an RGBA8888 pixel format. This will let you have effects with transparency
// IMPORTANT: Call this function at the very beginning, before running your 1st scene
// Use this pixel format to have transparent buffers
|
|
[[CCDirector sharedDirector] setPixelFormat:kPixelFormatRGBA8888]; |
Incoming search terms: