The picture above is a particle system to simulate fire and smoke,all is well done , but when the camera move close to this smoke, the fps will reduce quickly, if the camera move in the center of the smoke ,the fps may reduce half, with the test result ,the function glDepthMask(GL_FALSE)bring on this result , the follow is the particle draw code:
(do not use alphafunc)
glDepthMask(GL_FALSE);
glBlendFunc(GL_ONE, GL_SRC_ALPHA_SATURATE);
glDisable(GL_FOG);
glDisable(GL_CULL_FACE);
//bind texture
glTranslatef(pos.x,pos.y,pos.z);
glColor4f(color.xcolor.w,color.ycolor.w,color.z*color.w,alpha);
glRotatef(Rotbase,0.0f,0.0f,1.0f);
Rotbase+=Rotf;
glBegin(GL_QUADS);
glTexCoord2f(0,1);
glVertex3f(size, size, 0);
glTexCoord2f(0,0);
glVertex3f(size, -size, 0);
glTexCoord2f(1,0);
glVertex3f(-size, -size, 0);
glTexCoord2f(1,1);
glVertex3f(-size, size, 0);
glEnd();
glEnable(GL_CULL_FACE);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
glEnable(GL_FOG);
glDepthMask(GL_TRUE);
glPopMatrix();
who can help me ?