CDN加速镜像 | 设为首页 | 加入收藏夹
当前位置: 首页 资源下载 源码下载 图形图象 OpenGL

文件名称:opengl_qt_simple_draw

  • 所属分类:
  • 标签属性:
  • 上传时间:
    2012-11-16
  • 文件大小:
    245.77kb
  • 已下载:
    0次
  • 提 供 者:
  • 相关连接:
  • 下载说明:
    别用迅雷下载,失败请重下,重下不扣分!

介绍说明--下载内容来自于网络,使用问题请自行百度

本文来讲讲怎样使用opengl来画平面几何图形,这一节本来是很简单的,因为某些问题都弄大半天了。当然,这还是按照NeHe的教程来的学习的。



这次实现的功能是在窗口中画一个三角形,一个矩形,一个圆形。

下面来看看怎么绘制平面几何图形。在设置好需要画的几何图形的属性后,比如颜色信息,就以glBegin()开始,以glEnd()结束,glBegin()中的参数为所画几何图形的类型,比如说GL_ TRIANGLES代表三角形,GL_QUADS为矩形等等。



在glBegin()和glEnd()之间是放的点,这里是三维的点,这些点是对应所画矩形的类型的。



画圆的话稍微麻烦一点,因为opengl中没有直接对应的类型,一般都是采用三角形来逼近,其它很多几何图形也是类似的。在用三角形逼近时,是用的画连续三角形,一般有2种类型。-This article say something about how to use opengl to draw a plane geometry, this section was very simple, because some of the issues Dounong most of the day. Of course, this is in accordance with the NeHe the tutorial come to learn. The functions realized in the window, drawing a triangle, a rectangle, a circle. Let' s take a look at how to draw a plane geometry. After setting up the need to draw geometric properties, such as color, glBegin () to glEnd () end glBegin () in the argument is drawn geometry type, for example, on behalf of the triangle GL_ TRIANGLES GL_QUADS is rectangular, etc.. GlBegin () and glEnd () between the discharge point, here is the three-dimensional points, these points correspond painted rectangular type. Draw a circle, then a little difficult, because opengl not directly correspond to the type of triangle are generally used to approximate many other geometry is similar. Painting with continuous triangle with triangular approximation, generally 2 types.
(系统自动生成,下载前可以参看下载内容)

下载文件列表

opengl_nehe_02/
opengl_nehe_02/glwidget.cpp
opengl_nehe_02/glwidget.h
opengl_nehe_02/glwidget.ui
opengl_nehe_02/main.cpp
opengl_nehe_02/opengl_nehe_02.pro
opengl_nehe_02/opengl_nehe_02.pro.user
OpenGL_Qt学习笔记之_02(绘制简单平面几何图形).pdf

相关说明

  • 本站资源为会员上传分享交流与学习,如有侵犯您的权益,请联系我们删除.
  • 搜珍网是交换下载平台,只提供交流渠道,下载内容来自于网络,除下载问题外,其它问题请自行百度。更多...
  • 本站已设置防盗链,请勿用迅雷、QQ旋风等下载软件下载资源,下载后用WinRAR最新版进行解压.
  • 如果您发现内容无法下载,请稍后再次尝试;或换浏览器;或者到消费记录里找到下载记录反馈给我们.
  • 下载后发现下载的内容跟说明不相乎,请到消费记录里找到下载记录反馈给我们,经确认后退回积分.
  • 如下载前有疑问,可以通过点击"提供者"的名字,查看对方的联系方式,联系对方咨询.

相关评论

暂无评论内容.

发表评论

*快速评论: 推荐 一般 有密码 和说明不符 不是源码或资料 文件不全 不能解压 纯粹是垃圾
*内  容:
*验 证 码:
搜珍网 www.dssz.com