summaryrefslogtreecommitdiff
path: root/src/renderer/tr_surface.c
diff options
context:
space:
mode:
authorTim Angus <tim@ngus.net>2006-05-06 17:18:02 +0000
committerTim Angus <tim@ngus.net>2006-05-06 17:18:02 +0000
commitbb7bd83aaec4504b4fb90919cccaaf4d9a7b418d (patch)
treea99058fef0dbf93af48dab4581b9f785d93e68ff /src/renderer/tr_surface.c
parentbd9d761dd958aef00218de084bae00eb9bf788a4 (diff)
* Merged ioq3-r775
- SDL_GammaRamp stuff - Anisotropic texture filtering - q3testesque r_flares - cl_guid - Security fixes
Diffstat (limited to 'src/renderer/tr_surface.c')
-rw-r--r--src/renderer/tr_surface.c67
1 files changed, 4 insertions, 63 deletions
diff --git a/src/renderer/tr_surface.c b/src/renderer/tr_surface.c
index a65b17db..2a291c84 100644
--- a/src/renderer/tr_surface.c
+++ b/src/renderer/tr_surface.c
@@ -1215,71 +1215,12 @@ void RB_SurfaceBad( surfaceType_t *surfType ) {
ri.Printf( PRINT_ALL, "Bad surface tesselated.\n" );
}
-#if 0
-
-void RB_SurfaceFlare( srfFlare_t *surf ) {
- vec3_t left, up;
- float radius;
- byte color[4];
- vec3_t dir;
- vec3_t origin;
- float d;
-
- // calculate the xyz locations for the four corners
- radius = 30;
- VectorScale( backEnd.viewParms.or.axis[1], radius, left );
- VectorScale( backEnd.viewParms.or.axis[2], radius, up );
- if ( backEnd.viewParms.isMirror ) {
- VectorSubtract( vec3_origin, left, left );
- }
-
- color[0] = color[1] = color[2] = color[3] = 255;
-
- VectorMA( surf->origin, 3, surf->normal, origin );
- VectorSubtract( origin, backEnd.viewParms.or.origin, dir );
- VectorNormalize( dir );
- VectorMA( origin, r_ignore->value, dir, origin );
-
- d = -DotProduct( dir, surf->normal );
- if ( d < 0 ) {
- return;
- }
-#if 0
- color[0] *= d;
- color[1] *= d;
- color[2] *= d;
-#endif
-
- RB_AddQuadStamp( origin, left, up, color );
-}
-
-#else
-
-void RB_SurfaceFlare( srfFlare_t *surf ) {
-#if 0
- vec3_t left, up;
- byte color[4];
-
- color[0] = surf->color[0] * 255;
- color[1] = surf->color[1] * 255;
- color[2] = surf->color[2] * 255;
- color[3] = 255;
-
- VectorClear( left );
- VectorClear( up );
-
- left[0] = r_ignore->value;
-
- up[1] = r_ignore->value;
-
- RB_AddQuadStampExt( surf->origin, left, up, color, 0, 0, 1, 1 );
-#endif
+void RB_SurfaceFlare(srfFlare_t *surf)
+{
+ if (r_flares->integer)
+ RB_AddFlare(surf, tess.fogNum, surf->origin, surf->color, surf->normal);
}
-#endif
-
-
-
void RB_SurfaceDisplayList( srfDisplayList_t *surf ) {
// all apropriate state must be set in RB_BeginSurface
// this isn't implemented yet...