Source/ThunderBeast/QuakeToonProto1/ref_gl/gl_rsurf.c
void R_DrawAlphaSurfaces (void)
{
	msurface_t	*s;
	float		intens;

	//
	// go back to the world matrix
	//
    qglLoadMatrixf (r_world_matrix);

	qglEnable (GL_BLEND);
	GL_TexEnv( GL_MODULATE );

	// the textures are prescaled up for a better lighting range,
	// so scale it back down
	intens = gl_state.inverse_intensity;

	for (s=r_alpha_surfaces ; s ; s=s->texturechain)
	{
		GL_Bind(s->texinfo->image->texnum);
		c_brush_polys++;
		if (s->texinfo->flags & SURF_TRANS33)
			qglColor4f (intens,intens,intens,0.33);
		else if (s->texinfo->flags & SURF_TRANS66)
			qglColor4f (intens,intens,intens,0.66);
		else
			qglColor4f (intens,intens,intens,1);
		if (s->flags & SURF_DRAWTURB)
			EmitWaterPolys (s);
		else if(s->texinfo->flags & SURF_FLOWING)			// PGM	9/16/98
			DrawGLFlowingPoly (s);							// PGM
		else
			DrawGLPoly (s->polys);
	}

	GL_TexEnv( GL_REPLACE );
	qglColor4f (1,1,1,1);
	qglDisable (GL_BLEND);

	r_alpha_surfaces = NULL;
}
/*
================
R_DrawAlphaSurfaces

Draw water surfaces and windows.
The BSP tree is waled front to back, so unwinding the chain
of alpha_surfaces will draw back to front, giving proper ordering.
================
*/
R_DrawAlphaSurfaces
Draw water surfaces and windows.
The BSP tree is waled front to back, so unwinding the chain
of alpha_surfaces will draw back to front, giving proper ordering.
R_DrawAlphaSurfaces Draw water surfaces and windows . The BSP tree is waled front to back so unwinding the chain of alpha_surfaces will draw back to front giving proper ordering .
void R_DrawAlphaSurfaces (void)
{
	msurface_t	*s;
	float		intens;
	 go back to the world matrix
    qglLoadMatrixf (r_world_matrix);
	qglEnable (GL_BLEND);
	GL_TexEnv( GL_MODULATE );
	 the textures are prescaled up for a better lighting range,
	 so scale it back down
	intens = gl_state.inverse_intensity;
	for (s=r_alpha_surfaces ; s ; s=s->texturechain)
	{
		GL_Bind(s->texinfo->image->texnum);
		c_brush_polys++;
		if (s->texinfo->flags & SURF_TRANS33)
			qglColor4f (intens,intens,intens,0.33);
		else if (s->texinfo->flags & SURF_TRANS66)
			qglColor4f (intens,intens,intens,0.66);
		else
			qglColor4f (intens,intens,intens,1);
		if (s->flags & SURF_DRAWTURB)
			EmitWaterPolys (s);
		else if(s->texinfo->flags & SURF_FLOWING)			 PGM	9/16/98
			DrawGLFlowingPoly (s);							 PGM
		else
			DrawGLPoly (s->polys);
	}
	GL_TexEnv( GL_REPLACE );
	qglColor4f (1,1,1,1);
	qglDisable (GL_BLEND);
	r_alpha_surfaces = NULL;
}
void R_DrawAlphaSurfaces ( void ) { msurface_t * s ; float intens ; qglLoadMatrixf ( r_world_matrix ) ; qglEnable ( GL_BLEND ) ; GL_TexEnv ( GL_MODULATE ) ; intens = gl_state . inverse_intensity ; for ( s = r_alpha_surfaces ; s ; s = s -> texturechain ) { GL_Bind ( s -> texinfo -> image -> texnum ) ; c_brush_polys ++ ; if ( s -> texinfo -> flags & SURF_TRANS33 ) qglColor4f ( intens , intens , intens , 0.33 ) ; else if ( s -> texinfo -> flags & SURF_TRANS66 ) qglColor4f ( intens , intens , intens , 0.66 ) ; else qglColor4f ( intens , intens , intens , 1 ) ; if ( s -> flags & SURF_DRAWTURB ) EmitWaterPolys ( s ) ; else if ( s -> texinfo -> flags & SURF_FLOWING ) DrawGLFlowingPoly ( s ) ; else DrawGLPoly ( s -> polys ) ; } GL_TexEnv ( GL_REPLACE ) ; qglColor4f ( 1 , 1 , 1 , 1 ) ; qglDisable ( GL_BLEND ) ; r_alpha_surfaces = NULL ; }
R_DrawAlphaSurfaces
Draw water surfaces and windows.
R_DrawAlphaSurfaces Draw water surfaces and windows .
// // go back to the world matrix // // the textures are prescaled up for a better lighting range, // so scale it back down // PGM	9/16/98 // PGM