bug fix on closing window
scale function is working again
bug fix: wrong color range in OpenGL