Qt Opengl-LMLPHP

目前在Qt5中做Opengl的学习时候,发现gluPerspective函数没有定义。

1:
  gluPerspective( 45.0, (GLfloat)width/(GLfloat)height, 0.1, 100.0 );
2:
  GLfloat zNear = 0.1;
  GLfloat zFar = 100.0;
  GLfloat aspect = (GLfloat)width/(GLfloat)height;
  GLfloat fH = tan(GLfloat(45.0/360.0*3.14159))*zNear;
  GLfloat fW = fH * aspect;
  glFrustum(-fW, fW, -fH, fH, zNear, zFar);
05-02 05:00