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 本文版权归作者和博客园共有,欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出原文连接,否则保留追究法律责任的权利. 感谢您的阅读。如果觉得有用的就请各位大神高抬贵手“推荐一下”吧!你的精神支持是博主强大的写作动力。 如果觉得我的博客有意思,欢迎点击首页左上角的“+加关注”按钮关注我!
  • 相关阅读:
    php 无限极分类
    高德地图随笔
    安全随笔
    关于专线映射问题
    js小技巧总结
    php+ajax 文件上传
    去除数组中重复的元素
    关于ueditor插入不了动态地图
    vue.js 安装
    js轮播
  • 原文地址:https://www.cnblogs.com/zhaohu/p/8436845.html
Copyright © 2011-2022 走看看