r_surface.c File Reference

surface-related refresh code More...

#include "r_local.h"
#include "r_lightmap.h"
#include "r_light.h"
#include "r_error.h"
#include "r_draw.h"
Include dependency graph for r_surface.c:

Go to the source code of this file.

Functions

static void R_UseMaterial (const material_t *material)
void R_SetSurfaceBumpMappingParameters (const mBspSurface_t *surf, const image_t *normalMap)
static void R_SetSurfaceState (const mBspSurface_t *surf)
 Set the surface state according to surface flags and bind the texture.
static void R_DrawSurface (const mBspSurface_t *surf)
 Use the vertex, texture and normal arrays to draw a surface.
static void R_DrawSurfaces (const mBspSurfaces_t *surfs)
 General surface drawing function, that draw the surface chains.
void R_DrawOpaqueSurfaces (const mBspSurfaces_t *surfs)
 Draw the surface chain with multitexture enabled and light enabled.
void R_DrawOpaqueWarpSurfaces (mBspSurfaces_t *surfs)
 Draw the surfaces via warp shader.
void R_DrawAlphaTestSurfaces (mBspSurfaces_t *surfs)
void R_DrawBlendSurfaces (const mBspSurfaces_t *surfs)
 Draw the surface chain with multitexture enabled and blend enabled.
void R_DrawBlendWarpSurfaces (mBspSurfaces_t *surfs)
 Draw the alpha surfaces via warp shader and with blend enabled.

Detailed Description

surface-related refresh code

Definition in file r_surface.c.


Function Documentation

void R_DrawAlphaTestSurfaces ( mBspSurfaces_t surfs  ) 
void R_DrawBlendSurfaces ( const mBspSurfaces_t surfs  ) 

Draw the surface chain with multitexture enabled and blend enabled.

See also:
R_DrawOpaqueSurfaces

Definition at line 223 of file r_surface.c.

References rstate_t::blend_enabled, mBspSurfaces_s::count, qfalse, qtrue, R_DrawSurfaces(), R_EnableTexture(), r_state, and texunit_lightmap.

Referenced by R_DrawBspModelSurfaces(), and R_RenderFrame().

void R_DrawBlendWarpSurfaces ( mBspSurfaces_t surfs  ) 

Draw the alpha surfaces via warp shader and with blend enabled.

See also:
R_DrawOpaqueWarpSurfaces

Definition at line 238 of file r_surface.c.

References rstate_t::blend_enabled, mBspSurfaces_s::count, qfalse, qtrue, R_DrawSurfaces(), R_EnableWarp(), r_state, and rstate_t::warp_program.

Referenced by R_DrawBspModelSurfaces(), and R_RenderFrame().

void R_DrawOpaqueSurfaces ( const mBspSurfaces_t surfs  ) 

Draw the surface chain with multitexture enabled and light enabled.

See also:
R_DrawBlendSurfaces

Definition at line 179 of file r_surface.c.

References mBspSurfaces_s::count, qfalse, qtrue, R_DrawSurfaces(), R_EnableLighting(), R_EnableTexture(), r_state, texunit_lightmap, and rstate_t::world_program.

Referenced by R_DrawBspModelSurfaces(), and R_RenderFrame().

void R_DrawOpaqueWarpSurfaces ( mBspSurfaces_t surfs  ) 

Draw the surfaces via warp shader.

See also:
R_DrawBlendWarpSurfaces

Definition at line 197 of file r_surface.c.

References mBspSurfaces_s::count, qfalse, qtrue, R_DrawSurfaces(), R_EnableWarp(), r_state, and rstate_t::warp_program.

Referenced by R_DrawBspModelSurfaces(), and R_RenderFrame().

static void R_DrawSurface ( const mBspSurface_t surf  )  [inline, static]

Use the vertex, texture and normal arrays to draw a surface.

See also:
R_DrawSurfaces

Definition at line 134 of file r_surface.c.

References rendererData_t::brushCount, mBspSurface_s::index, cvar_s::integer, mBspSurface_s::maxs, mBspSurface_s::mins, mBspSurface_s::numedges, R_DrawBoundingBox(), r_showbox, and refdef.

Referenced by R_DrawSurfaces().

static void R_DrawSurfaces ( const mBspSurfaces_t surfs  )  [static]
void R_SetSurfaceBumpMappingParameters ( const mBspSurface_t surf,
const image_t normalMap 
)
static void R_SetSurfaceState ( const mBspSurface_t surf  )  [static]
static void R_UseMaterial ( const material_t material  )  [inline, static]

Generated by  doxygen 1.6.2