Description: 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 )
To Search:
File list (Check if you may need any files):
MyWater
.......\Debug
.......\.....\MainFrm.obj
.......\.....\MyTexture.obj
.......\.....\MyWater.exe
.......\.....\MyWater.ilk
.......\.....\MyWater.obj
.......\.....\MyWater.pch
.......\.....\MyWater.pdb
.......\.....\MyWater.res
.......\.....\MyWaterDoc.obj
.......\.....\MyWaterView.obj
.......\.....\StdAfx.obj
.......\.....\vc60.idb
.......\.....\vc60.pdb
.......\.....\WATER1.BW
.......\MainFrm.cpp
.......\MainFrm.h
.......\MyTexture.cpp
.......\MyTexture.h
.......\MyWater.clw
.......\MyWater.cpp
.......\MyWater.dsp
.......\MyWater.dsw
.......\MyWater.h
.......\MyWater.ncb
.......\MyWater.opt
.......\MyWater.plg
.......\MyWater.rc
.......\MyWaterDoc.cpp
.......\MyWaterDoc.h
.......\MyWaterView.cpp
.......\MyWaterView.h
.......\ReadMe.txt
.......\RES
.......\...\MyWater.rc2
.......\Resource.h
.......\StdAfx.cpp
.......\StdAfx.h
.......\WATER1.BW