OpenGL depth buffer on Android

前端 未结 2 1915
余生分开走
余生分开走 2021-01-14 00:52

I\'m currently learning OpenGL ES programming on Android (2.1). I started with the obligatory rotating cube. It\'s rotating fine but I can\'t get the depth buffer to work. T

2条回答
  •  清酒与你
    2021-01-14 01:15

    Found it myself. It wasn't GL code, it was android code:

    view.setEGLConfigChooser(false);
    

    The "false" in this line explicitly says that no Z-Buffer should be allocated. After switching it to "true" it worked perfectly.

提交回复
热议问题