Forums

Full Version: Depth Buffers
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
In page 318, The Fixed Pipeline Isn't Quite Dead

Though the text is all correct, there is no specific notice that the EGL attribute_list will also need to have defined a depth buffer defined as below, if you have expanded from the cubefast demo, you will need to update your attribute list to look like this, the hellocubestex demo already has this set up.

static const EGLint attribute_list[] =
{
EGL_RED_SIZE,
8,
EGL_GREEN_SIZE,
8,
EGL_BLUE_SIZE,
8,
EGL_ALPHA_SIZE,
8,
EGL_SAMPLE_BUFFERS,1, // if you want anti alias at a slight fps cost
EGL_SAMPLES,4,  //keep these 2lines, espeically useful for lower resolution
 
EGL_DEPTH_SIZE,5, //<<<<this allows depth buffers to work
EGL_SURFACE_TYPE,
EGL_WINDOW_BIT,
EGL_NONE
};