文件名称: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.
这次实现的功能是在窗口中画一个三角形,一个矩形,一个圆形。
下面来看看怎么绘制平面几何图形。在设置好需要画的几何图形的属性后,比如颜色信息,就以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
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
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.