zoukankan      html  css  js  c++  java
  • Qt Opengl

    目前在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);
    作者:长风 Email:844064492@qq.com QQ群:607717453 Git:https://github.com/zhaohu19910409Dz 开源项目:https://github.com/OriginMEK/MEK 本文版权归作者和博客园共有,欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出原文连接,否则保留追究法律责任的权利. 感谢您的阅读。如果觉得有用的就请各位大神高抬贵手“推荐一下”吧!你的精神支持是博主强大的写作动力。 如果觉得我的博客有意思,欢迎点击首页左上角的“+加关注”按钮关注我!
  • 相关阅读:
    中间件格式
    python3 bytes与str数据类型相互转换
    python 连接mongodb 使用
    md5 简单加密
    django 使用https协议运行runserver
    工厂模式
    C++字符串
    C++字符
    C++数学函数
    MATLAB函数总结——数值运算和符号运算
  • 原文地址:https://www.cnblogs.com/zhaohu/p/8436845.html
Copyright © 2011-2022 走看看