文件名称:MyWater.基于vc++使用opengl开发的3D水纹波浪
介绍说明--下载内容来自于网络,使用问题请自行百度
基于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 )
场景绘制与渲染
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 )
(系统自动生成,下载前可以参看下载内容)
下载文件列表
MyWater/Debug/MainFrm.obj
MyWater/Debug/MyTexture.obj
MyWater/Debug/MyWater.exe
MyWater/Debug/MyWater.ilk
MyWater/Debug/MyWater.obj
MyWater/Debug/MyWater.pch
MyWater/Debug/MyWater.pdb
MyWater/Debug/MyWater.res
MyWater/Debug/MyWaterDoc.obj
MyWater/Debug/MyWaterView.obj
MyWater/Debug/StdAfx.obj
MyWater/Debug/vc60.idb
MyWater/Debug/vc60.pdb
MyWater/Debug/WATER1.BW
MyWater/MainFrm.cpp
MyWater/MainFrm.h
MyWater/MyTexture.cpp
MyWater/MyTexture.h
MyWater/MyWater.clw
MyWater/MyWater.cpp
MyWater/MyWater.dsp
MyWater/MyWater.dsw
MyWater/MyWater.h
MyWater/MyWater.ncb
MyWater/MyWater.opt
MyWater/MyWater.plg
MyWater/MyWater.rc
MyWater/MyWaterDoc.cpp
MyWater/MyWaterDoc.h
MyWater/MyWaterView.cpp
MyWater/MyWaterView.h
MyWater/ReadMe.txt
MyWater/RES/MyWater.ico
MyWater/RES/MyWater.rc2
MyWater/RES/MyWaterDoc.ico
MyWater/RES/Toolbar.bmp
MyWater/Resource.h
MyWater/StdAfx.cpp
MyWater/StdAfx.h
MyWater/WATER1.BW
MyWater/Debug
MyWater/RES
MyWater
MyWater/Debug/MyTexture.obj
MyWater/Debug/MyWater.exe
MyWater/Debug/MyWater.ilk
MyWater/Debug/MyWater.obj
MyWater/Debug/MyWater.pch
MyWater/Debug/MyWater.pdb
MyWater/Debug/MyWater.res
MyWater/Debug/MyWaterDoc.obj
MyWater/Debug/MyWaterView.obj
MyWater/Debug/StdAfx.obj
MyWater/Debug/vc60.idb
MyWater/Debug/vc60.pdb
MyWater/Debug/WATER1.BW
MyWater/MainFrm.cpp
MyWater/MainFrm.h
MyWater/MyTexture.cpp
MyWater/MyTexture.h
MyWater/MyWater.clw
MyWater/MyWater.cpp
MyWater/MyWater.dsp
MyWater/MyWater.dsw
MyWater/MyWater.h
MyWater/MyWater.ncb
MyWater/MyWater.opt
MyWater/MyWater.plg
MyWater/MyWater.rc
MyWater/MyWaterDoc.cpp
MyWater/MyWaterDoc.h
MyWater/MyWaterView.cpp
MyWater/MyWaterView.h
MyWater/ReadMe.txt
MyWater/RES/MyWater.ico
MyWater/RES/MyWater.rc2
MyWater/RES/MyWaterDoc.ico
MyWater/RES/Toolbar.bmp
MyWater/Resource.h
MyWater/StdAfx.cpp
MyWater/StdAfx.h
MyWater/WATER1.BW
MyWater/Debug
MyWater/RES
MyWater
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.