func doClear(_data) fvar(flg) flg = '0' if(isdef(ColorBuffer)) flg += '|GL_COLOR_BUFFER_BIT' end if(isdef(DepthBuffer)) flg += '|GL_DEPTH_BUFFER_BIT' end if(isdef(StencilBuffer)) flg += '|GL_STENCIL_BUFFER_BIT' end println('glClear(' + flg + ');') event(onClear) end