private void Render() { Gl.glViewport(0, 0, Width, Height); var vp = new[] { 0f, 0f, 0f, 0f }; Gl.glGetFloatv(Gl.GL_VIEWPORT, vp); float aspect = (vp[2] - vp[0]) / (vp[3] - vp[1]); Gl.glMatrixMode(Gl.GL_PROJECTION); Gl.glLoadIdentity(); Glu.gluPerspective(90.0f, aspect, 0.02f, 32.0f); Gl.glTranslatef(0, 0, -dist); Gl.glRotatef(elev, 1, 0, 0); Gl.glRotatef(ang, 0, 1, 0); if (RenderScene != null) { RenderScene.Invoke(); } }