Location:
Search - gltranslatef
Search list
Description: 本源码是有关OpenGL编程指南第六版书本的的示例,详细介绍了一些常用函数的用法,包括:glTranslatef,glVertex,glOrtho,glView
Platform: |
Size: 1307915 |
Author: daihuan1985@163.com |
Hits:
Description: 基于vc++使用opengl开发的3D水纹波浪,
场景绘制与渲染
BOOL CMyWaterView::RenderScene()
{
glClear(GL_COLOR_BUFFER_BIT)
glPushMatrix()
glScalef(10,1,10)
if (!rgb)
glColor3f(.31, .41, .97)
else
glColor3f(1.f,1.f,1.f)
glTranslatef(0.f,-1.f,0.f)
glMatrixMode(GL_TEXTURE)
glPushMatrix()
glTranslatef(ttrans[0], ttrans[1], 0.)
glScalef(10.f, 10.f,1.f)
draw_mesh()
glPopMatrix()
glMatrixMode(GL_MODELVIEW)
glPopMatrix()
ttrans[0] += .005f
if (ttrans[0] == 1.0f) ttrans[0] = 0.0f
ttrans[1] -= .0025f
if (ttrans[1] <= 0.0f) ttrans[1] = 1.0f
::SwapBuffers(m_pDC->GetSafeHdc()) //交互缓冲区
return TRUE
}-Based on vc++ using the opengl developed 3D wave水纹, drawing and rendering scenes BOOL CMyWaterView:: RenderScene () (glClear (GL_COLOR_BUFFER_BIT) glPushMatrix () glScalef (10,1,10) if (! Rgb) glColor3f ( .31, .41, .97) else glColor3f (1.f, 1.f, 1.f) glTranslatef (0.f,-1.f, 0.f) glMatrixMode (GL_TEXTURE) glPushMatrix () glTranslatef (ttrans [0], ttrans [1], 0.) glScalef (10.f, 10.f, 1.f) draw_mesh () glPopMatrix () glMatrixMode (GL_MODELVIEW) glPopMatrix () ttrans [0]+ = .005 f if (ttrans [0] == 1.0f) ttrans [0] = 0.0f ttrans [1]-= .0025 f if (ttrans [1] < = 0.0f) ttrans [1 ] = 1.0f :: SwapBuffers (m_pDC-> GetSafeHdc ()) // interactive buffer return TRUE )
Platform: |
Size: 2021376 |
Author: xuchi |
Hits:
Description: 题目:编程实现 多边形的平移、旋转变换
要求:不能调用OpenGL的变换函数,如glTranslatef,
glRotatef,glScalef。要求通过矩阵相乘的方式,自
己计算出变换后几何图形的坐标。-do it without glTranslatef and glRotatef
Platform: |
Size: 2048 |
Author: jenny |
Hits:
Description: 帮助理解OpenGL基本概念,有关gltranslatef glvertex...等函数入门教程-OpenGL Programming Guide Sixth Edition source code to help understand the basic concepts of OpenGL, and other functions related to gltranslatef glvertex ...
Platform: |
Size: 802816 |
Author: 戴欢 |
Hits:
Description: 模拟太阳系。
/* 说明:
1.运行环境: Microsoft Visual Studio 2008
2.包含文件:图片六张(*.bmp),两个外部文件Texture.h和Texture.cpp
3.照明GL_LIGHT1
4.运用glTranslatef和glRotatef设置星球位置、公转和自转
5.运用Texturing覆盖星球表面
6.运用glBlendFunc设置太阳的半透明光晕
7.键盘‘a/A’,‘d/D’,‘s/S’分别控制:环境光、漫反射、镜面反射 */-Simulated solar system
Platform: |
Size: 3026944 |
Author: dongli |
Hits:
Description: 修改示例程序的gluLookAt()函数,把它改为模型变换函数glTranslatef(),并使用参数(0.0,0.0,-5.0)。这个函数的效果应该和使用gluLookAt()函数的效果完全相同。为什么这两个命令的效果会完全相同呢?-Modify the example program gluLookAt () function, changed it to model transformation function glTranslatef (), and use the parameters (0.0, 0.0, 0.0). This function should be used and the effect of gluLookAt () function of exactly the same effect. Why the effect of the two commands will be exactly the same?
Platform: |
Size: 235520 |
Author: 蓝 |
Hits:
Description: 题目:编程实现 多边形的平移、旋转变换 要求:不能调用OpenGL的变换函数,如glTranslatef, glRotatef,glScalef。要求通过矩阵相乘的方式,自 己计算出变换后几何图形的坐标。-do it without glTranslatef and glRotatef
Platform: |
Size: 2048 |
Author: marketf |
Hits:
Description: 题目:编程实现 多边形的平移、旋转变换 要求:不能调用OpenGL的变换函数,如glTranslatef, glRotatef,glScalef。要求通过矩阵相乘的方式,自 己计算出变换后几何图形的坐标。-do it without glTranslatef and glRotatef
Platform: |
Size: 2048 |
Author: PPIfe |
Hits: