Fixed buffer use and added resizeGL()