android - Is glClear(GL_COLOR_BUFFER_BIT) necessary when I already glDisable(GL_BLEND)? -
in understanding, if disable gl_blend, no blending happens @ all. don't need glclear(gl_color_buffer_bit).
i working on gles20 android programming. have added line below.
gles20.gldisable(gles20.gl_blend); if don't add glclear(gl_color_buffer_bit), other devices work except nexus 4. on nexus 4, on 1 pass (other passes work normally), partial area rendered. if add glclear(gl_color_buffer_bit), nexus 4 works well.
if gl_blend disabled, fragment of draw buffer overwritten, if drawn to.
if disable blending , write on every fragment of draw buffer in every frame, useless clear draw buffer, because each fragment set during drawing process.
glclear(gl_color_buffer_bit) nothing else write every fragment constant color set glclearcolor.
note, have ensure, every fragment written in each frame. example if gl_depth_test enabled you'll have glclear(gl_depth_buffer_bit anyway.
wiki
Comments
Post a Comment