首页 > 其他 > 详细

QT_opengl_gluPerspective没有定义的处理方法

时间:2014-02-25 19:34:10      阅读:1112      评论:0      收藏:0      [点我收藏+]

原地址: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);

QT_opengl_gluPerspective没有定义的处理方法

原文:http://www.cnblogs.com/lanye/p/3566038.html

(0)
(1)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!