:使用C++程序实现三角锥的三维效果,可以进行实体的旋转操作
Curriculum design, triangular vertebral 3D graphics the, Visual C++ programming (2013-01-17, Visual C++, 404KB, 下载4次)
基于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 ) (2009-05-20, Visual C++, 1974KB, 下载23次)