correct code in paintGL
optimization of basic gui layer