improve redraw for gl
merge