Depth Buffers - Printable Version +- Forums (http://www.scratchpadgames.net/forums) +-- Forum: Main Forums (http://www.scratchpadgames.net/forums/forumdisplay.php?fid=1) +--- Forum: Fundamentals Errata/Questions (http://www.scratchpadgames.net/forums/forumdisplay.php?fid=3) +--- Thread: Depth Buffers (/showthread.php?tid=77) |
Depth Buffers - Brian Beuken - 04-23-2018 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 }; RE: Depth Buffers - Brian Beuken - 03-09-2019 Btw if you are using one of the less well supported boards which emulates its graphics, quite a few of the emulated systems have a real problem with EGL_SAMPLE_BUFFERS,1, EGL_SAMPLES,4, almost every boards with emulated graphics fails to init OpenGLES if these 2 lines are present, so you may need to comment them out. |