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"
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. |
surface-related refresh code
Definition in file r_surface.c.
void R_DrawAlphaTestSurfaces | ( | mBspSurfaces_t * | surfs | ) |
Definition at line 207 of file r_surface.c.
References mBspSurfaces_s::count, qfalse, qtrue, R_DrawSurfaces(), R_EnableAlphaTest(), R_EnableLighting(), r_state, and rstate_t::world_program.
Referenced by R_DrawBspModelSurfaces(), and R_RenderFrame().
void R_DrawBlendSurfaces | ( | const mBspSurfaces_t * | surfs | ) |
Draw the surface chain with multitexture enabled and blend enabled.
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.
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.
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.
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.
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] |
General surface drawing function, that draw the surface chains.
Definition at line 150 of file r_surface.c.
References rstate_t::bumpmap_enabled, mBspSurfaces_s::count, rlocals_s::frame, mBspSurface_s::frame, rstate_t::glowmap_enabled, i, qfalse, R_Color(), R_DrawSurface(), R_EnableBumpmap(), R_EnableGlowMap(), r_locals, R_ResetArrayState(), R_SetSurfaceState(), r_state, and mBspSurfaces_s::surfaces.
Referenced by R_DrawAlphaTestSurfaces(), R_DrawBlendSurfaces(), R_DrawBlendWarpSurfaces(), R_DrawOpaqueSurfaces(), and R_DrawOpaqueWarpSurfaces().
void R_SetSurfaceBumpMappingParameters | ( | const mBspSurface_t * | surf, | |
const image_t * | normalMap | |||
) |
Definition at line 66 of file r_surface.c.
References mBspSurface_s::deluxemap_texnum, mBspSurface_s::flags, mBspTexInfo_s::image, rstate_t::lighting_enabled, image_s::material, MSURF_LIGHTMAP, qfalse, qtrue, R_BindDeluxemapTexture(), r_bumpmap, R_EnableBumpmap(), r_state, R_UseMaterial(), mBspSurface_s::texinfo, and cvar_s::value.
Referenced by R_SetSurfaceState(), and R_StageLighting().
static void R_SetSurfaceState | ( | const mBspSurface_t * | surf | ) | [static] |
Set the surface state according to surface flags and bind the texture.
Definition at line 91 of file r_surface.c.
References rstate_t::blend_enabled, mBspSurface_s::flags, mBspTexInfo_s::flags, image_s::glowmap, mBspTexInfo_s::image, mBspSurface_s::lightmap_texnum, MSURF_LIGHTMAP, image_s::normalmap, qfalse, qtrue, R_BindLightmapTexture(), R_BindTexture, R_CheckError, R_Color(), R_EnableGlowMap(), r_mapTiles, R_SetArrayState(), R_SetSurfaceBumpMappingParameters(), r_state, SURF_BLEND33, SURF_BLEND66, mBspSurface_s::texinfo, image_s::texnum, texunit_lightmap, and mBspSurface_s::tile.
Referenced by R_DrawSurfaces().
static void R_UseMaterial | ( | const material_t * | material | ) | [inline, static] |
Definition at line 32 of file r_surface.c.
References rstate_t::active_material, material_s::bump, material_s::hardness, material_s::parallax, r_bumpmap, r_hardness, r_parallax, R_ProgramParameter1f(), r_specular, r_state, material_s::specular, and cvar_s::value.
Referenced by R_SetSurfaceBumpMappingParameters().