Welcome![Sign In][Sign Up]
Location:
Search - glu open

Search list

[OpenGL programproj1

Description: 在Windows系统中,安装GLUT库:打开glut-3.7.6-bin.zip,取出glut.h,glut32.lib,glut32.dll,分别放置。 使用Visual Studio C++编译已有项目工程,并修改代码生成以下图形: 在此基础上,修改各顶点颜色,使得每个顶点颜色不一样,多边形内部颜色渐变。 操作方法和实验步骤: 1.使用GL_POLYGON模式绘制白色的多边形,由于所绘多边形为凹多边形,故从最左上角的点开始绘制,以防得到不可预测的图形。注意求得各凹角(reflex convex)处的顶点坐标。 2.下面考虑修改各顶点颜色。首先多边形绘制改为从位于图形中心的(0,0)处开始,并设为白色。 3.此后对于六个凹角处的顶点分别设定其颜色为黄色,绿色,青色,蓝色,洋红色及红色。默认状态下多边形将出现渐变的效果。 4.此时运行程序将得到如右图所示效果:为此,我们再次绘制前面所绘制的第一个多边形顶点,即可得到所要求图形。 -In the Windows system, install the GLUT libraries: Open glut-3.7.6-bin.zip, remove glut.h, glut32.lib, glut32.dll, were placed. The use of Visual Studio C++ compiler has been the project works, and modify the code generates the following graph: On this basis, modify the vertex colors to make different colors for each vertex, polygon internal color gradient. Operational methods and experimental steps: 1. Use GL_POLYGON draw white polygon models, as painted concave polygon as a polygon, so starting from the most upper left point rendering, in case the graphics to be unpredictable. Note to seek the concave angle (reflex convex) at the vertex coordinates. 2. The following consider amending the vertex colors. First, change from the rendering polygon graphics center located at (0,0) at the beginning, and set to white. 3. Then for the six respective concave corner vertex set its color to yellow, green, cyan, blue, magenta and red colors. Polygon will appear by default gradient e
Platform: | Size: 6144 | Author: 小痴狗子 | Hits:

[Shot GameGlewandGlut

Description: open gl u openglgluandglut openglinsta-open gl glu openglgluandglut openglinstall
Platform: | Size: 2873344 | Author: bdiea | Hits:

CodeBus www.codebus.net