资源介绍
基于粒子系统的火焰模拟的源代码
void CGLSetup::InitGL(GLsizei Width, GLsizei Height)
{
// Enable Texture Mapping
glEnable(GL_TEXTURE_2D);
// This Will Clear The Background Color To Black
glClearColor(0.0f, 0.0f, 0.0f, 0.0f);
// Enables Clearing Of The Depth Buffer
glClearDepth(1.0);
// Enables Smooth Color Shading
glShadeModel(GL_SMOOTH);
glMatrixMode(GL_PROJECTION);
// Reset The Projection Matrix
glLoadIdentity();
// Calculate The Aspect Ratio Of The Window
gluPerspective(45.0f,1.3333f,0.1f,1000.0f);
glMatrixMode(GL_MODELVIEW);
// Set The Blending Function For Translucency
glBlendFunc(GL_SRC_ALPHA,GL_ONE);
glEnable(GL_BLEND);
- 上一篇: Systemview5.0仿真软件,共三个压缩包!第二个!
- 下一篇: NBEARLISY使用