原地址:http://blog.sina.com.cn/s/blog_6b11cdda0101fe27.html

例如:
gluPerspective( 45.0, (GLfloat)width/(GLfloat)height, 0.1, 100.0 );
 
转换为:
GLfloat zNear = 0.1;
GLfloat zFar = 100.0;
GLfloat aspect = (GLfloat)width/(GLfloat)height;
GLfloat fH = tan(GLfloat(90.0/360.0*3.14159))*zNear;
GLfloat fW = fH * aspect;
glFrustum(-fW, fW, -fH, fH, zNear, zFar);

相关文章:

  • 2022-12-23
  • 2021-11-12
  • 2021-08-12
  • 2021-05-23
  • 2022-12-23
  • 2021-04-17
  • 2022-01-01
  • 2022-12-23
猜你喜欢
  • 2021-09-27
  • 2021-08-13
  • 2021-07-08
  • 2021-12-29
  • 2021-12-29
  • 2021-07-08
相关资源
相似解决方案