some minor opengl cleanup