Is there any alternative for GLES20.glClear(GLES20.GL_COLOR_BUFFER_BIT)?

谁说我不能喝 提交于 2020-01-03 03:27:27

问题


I get a fill rate of about 30fps in my application. I know that GLES20.glClear() is used to clear the screen for every draw. If i comment it i get a fps of about 60fps. But the output is not as expected. I have a content to be redrawn for the whole screen in every frame. Is there any alternative where i can redraw the whole screen with out using the GLES20.glClear(). Please let me know if there is any way to play around with GLES20.glClear() to improve the performance?


回答1:


If you overwrite the entire color buffer with your geometry each frame you can get away with just clearing the depth buffer.

Should save you some memory bandwidth.



来源:https://stackoverflow.com/questions/8911014/is-there-any-alternative-for-gles20-glcleargles20-gl-color-buffer-bit

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!