tests/cuda3.2/tests/smokeParticles/SmokeRenderer.cpp
void SmokeRenderer::drawPointSprites(GLSLProgram *prog, int start, int count, bool shadowed)
{
    glEnable(GL_DEPTH_TEST);
    glDepthMask(GL_FALSE);  // don't write depth
    glEnable(GL_BLEND);

    prog->enable();
    prog->setUniform1f("pointRadius", mParticleRadius);
	if (shadowed) {
		prog->bindTexture("shadowTex", m_lightTexture[m_srcLightTexture], GL_TEXTURE_2D, 0);
	}

    // draw points
    drawPoints(start, count, true);

    prog->disable();

    glDepthMask(GL_TRUE);
    glDisable(GL_BLEND);
}
// draw points using given shader program
draw points using given shader program
draw points using given shader program
void SmokeRenderer::drawPointSprites(GLSLProgram *prog, int start, int count, bool shadowed)
{
    glEnable(GL_DEPTH_TEST);
    glDepthMask(GL_FALSE);  
    glEnable(GL_BLEND);
    prog->enable();
    prog->setUniform1f("pointRadius", mParticleRadius);
	if (shadowed) {
		prog->bindTexture("shadowTex", m_lightTexture[m_srcLightTexture], GL_TEXTURE_2D, 0);
	}
    drawPoints(start, count, true);
    prog->disable();
    glDepthMask(GL_TRUE);
    glDisable(GL_BLEND);
}
void SmokeRenderer :: drawPointSprites ( GLSLProgram * prog , int start , int count , bool shadowed ) { glEnable ( GL_DEPTH_TEST ) ; glDepthMask ( GL_FALSE ) ; glEnable ( GL_BLEND ) ; prog -> enable ( ) ; prog -> setUniform1f ( " " , mParticleRadius ) ; if ( shadowed ) { prog -> bindTexture ( " " , m_lightTexture [ m_srcLightTexture ] , GL_TEXTURE_2D , 0 ) ; } drawPoints ( start , count , true ) ; prog -> disable ( ) ; glDepthMask ( GL_TRUE ) ; glDisable ( GL_BLEND ) ; }
draw points using given shader program
draw points using given shader program
// don't write depth // draw points