Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Depth Buffers
#1
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
};
Brian Beuken
Lecturer in Game Programming at Breda University of Applied Sciences.
Author of The Fundamentals of C/C++ Game Programming: Using Target-based Development on SBC's 



Reply


Messages In This Thread
Depth Buffers - by Brian Beuken - 04-23-2018, 01:58 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)