- glMatrixMode(GL_PROJECTION);\r
- glLoadIdentity();\r
- if (w <= h)\r
- glFrustum(-near, far, -near*(GLfloat) h / (GLfloat) w,\r
- far*(GLfloat) h / (GLfloat) w, nearClip, farClip);\r
- else\r
- glFrustum(-near*(GLfloat) w / (GLfloat) h,\r
- far*(GLfloat) w / (GLfloat) h, near, far, nearClip, farClip);\r
- glMatrixMode(GL_MODELVIEW);\r