Header file for the render material subsystem. More...
Go to the source code of this file.
Data Structures | |
struct | dirt_s |
struct | rotate_s |
struct | blendmode_s |
struct | pulse_s |
struct | stretch_s |
struct | scroll_s |
struct | scale_s |
struct | terrain_s |
struct | tape_s |
struct | anim_s |
struct | materialStage_s |
struct | material_s |
Defines | |
#define | STAGE_TEXTURE (1 << 0) |
#define | STAGE_ENVMAP (1 << 1) |
#define | STAGE_BLEND (1 << 2) |
#define | STAGE_COLOR (1 << 3) |
#define | STAGE_PULSE (1 << 4) |
#define | STAGE_STRETCH (1 << 5) |
#define | STAGE_ROTATE (1 << 6) |
#define | STAGE_SCROLL_S (1 << 7) |
#define | STAGE_SCROLL_T (1 << 8) |
#define | STAGE_SCALE_S (1 << 9) |
#define | STAGE_SCALE_T (1 << 10) |
#define | STAGE_TERRAIN (1 << 11) |
#define | STAGE_TAPE (1 << 12) |
#define | STAGE_LIGHTMAP (1 << 13) |
#define | STAGE_ANIM (1 << 14) |
#define | STAGE_DIRTMAP (1 << 15) |
#define | STAGE_FLARE (1 << 16) |
#define | STAGE_GLOWMAPLINK (1 << 17) |
#define | STAGE_LIGHTING (1 << 30) |
#define | STAGE_RENDER (1 << 31) |
#define | STAGE_TEXTURE_MATRIX |
#define | MAX_ANIM_FRAMES 16 |
#define | UPDATE_THRESHOLD 0.02 |
#define | DEFAULT_BUMP 1.0 |
#define | DEFAULT_PARALLAX 1.0 |
#define | DEFAULT_SPECULAR 1.0 |
#define | DEFAULT_HARDNESS 1.0 |
#define | DEFAULT_GLOWSCALE 1.0 |
Typedefs | |
typedef struct dirt_s | dirt_t |
typedef struct rotate_s | rotate_t |
typedef struct blendmode_s | blendmode_t |
typedef struct pulse_s | pulse_t |
typedef struct stretch_s | stretch_t |
typedef struct scroll_s | scroll_t |
typedef struct scale_s | scale_t |
typedef struct terrain_s | terrain_t |
typedef struct tape_s | tape_t |
typedef struct anim_s | anim_t |
typedef struct materialStage_s | materialStage_t |
typedef struct material_s | material_t |
Enumerations | |
enum | animLoop_t { ANIM_NORMAL, ANIM_ALTERNATE, ANIM_BACKWARDS, ANIM_RANDOM, ANIM_RANDOMFORCE } |
Functions | |
void | R_LoadMaterials (const char *map) |
Load material definitions for each map that has one. |
Header file for the render material subsystem.
Definition in file r_material.h.
#define DEFAULT_BUMP 1.0 |
Definition at line 150 of file r_material.h.
Referenced by R_ImageClearMaterials(), and R_LoadMaterials().
#define DEFAULT_GLOWSCALE 1.0 |
Definition at line 154 of file r_material.h.
Referenced by R_ImageClearMaterials(), R_LoadMaterials(), and R_ParseStage().
#define DEFAULT_HARDNESS 1.0 |
Definition at line 153 of file r_material.h.
Referenced by R_ImageClearMaterials(), and R_LoadMaterials().
#define DEFAULT_PARALLAX 1.0 |
Definition at line 151 of file r_material.h.
Referenced by R_ImageClearMaterials(), and R_LoadMaterials().
#define DEFAULT_SPECULAR 1.0 |
Definition at line 152 of file r_material.h.
Referenced by R_ImageClearMaterials(), and R_LoadMaterials().
#define MAX_ANIM_FRAMES 16 |
Definition at line 65 of file r_material.h.
Referenced by R_ParseStage().
#define STAGE_ANIM (1 << 14) |
Definition at line 47 of file r_material.h.
Referenced by R_LoadMaterials(), R_ParseStage(), and R_UpdateMaterial().
#define STAGE_BLEND (1 << 2) |
Definition at line 35 of file r_material.h.
Referenced by R_ParseStage(), and R_SetSurfaceStageState().
#define STAGE_COLOR (1 << 3) |
Definition at line 36 of file r_material.h.
Referenced by R_CreateSurfaceFlare(), R_ParseStage(), R_SetSurfaceStageState(), and R_StageColor().
#define STAGE_DIRTMAP (1 << 15) |
Definition at line 48 of file r_material.h.
Referenced by R_ParseStage(), R_SetSurfaceStageState(), R_StageColor(), and UI_MaterialEditorChangeValue_f().
#define STAGE_ENVMAP (1 << 1) |
Definition at line 34 of file r_material.h.
Referenced by R_ParseStage(), R_SetSurfaceStageState(), R_StageTexCoord(), and UI_MaterialEditorChangeValue_f().
#define STAGE_FLARE (1 << 16) |
Definition at line 49 of file r_material.h.
Referenced by R_CreateSurfaceFlare(), R_LoadSurfacesArrays_(), and R_ParseStage().
#define STAGE_GLOWMAPLINK (1 << 17) |
Definition at line 50 of file r_material.h.
Referenced by R_LoadAnimImages(), and R_ParseStage().
#define STAGE_LIGHTING (1 << 30) |
Definition at line 53 of file r_material.h.
Referenced by R_ParseStage(), R_StageLighting(), and UI_MaterialEditorChangeValue_f().
#define STAGE_LIGHTMAP (1 << 13) |
Definition at line 46 of file r_material.h.
Referenced by R_ParseStage(), and R_StageLighting().
#define STAGE_PULSE (1 << 4) |
Definition at line 37 of file r_material.h.
Referenced by R_ParseStage(), R_SetSurfaceStageState(), and R_UpdateMaterial().
#define STAGE_RENDER (1 << 31) |
Definition at line 56 of file r_material.h.
Referenced by R_DrawMaterialSurfaces(), R_LoadSurfacesArrays_(), R_ParseStage(), and UI_MaterialEditorChangeValue_f().
#define STAGE_ROTATE (1 << 6) |
Definition at line 39 of file r_material.h.
Referenced by R_ParseStage(), R_StageTextureMatrix(), and R_UpdateMaterial().
#define STAGE_SCALE_S (1 << 9) |
Definition at line 42 of file r_material.h.
Referenced by R_CreateSurfaceFlare(), R_ParseStage(), and R_StageTextureMatrix().
#define STAGE_SCALE_T (1 << 10) |
Definition at line 43 of file r_material.h.
Referenced by R_CreateSurfaceFlare(), R_ParseStage(), and R_StageTextureMatrix().
#define STAGE_SCROLL_S (1 << 7) |
Definition at line 40 of file r_material.h.
Referenced by R_ParseStage(), R_StageTextureMatrix(), and R_UpdateMaterial().
#define STAGE_SCROLL_T (1 << 8) |
Definition at line 41 of file r_material.h.
Referenced by R_ParseStage(), R_StageTextureMatrix(), and R_UpdateMaterial().
#define STAGE_STRETCH (1 << 5) |
Definition at line 38 of file r_material.h.
Referenced by R_ParseStage(), R_StageTextureMatrix(), and R_UpdateMaterial().
#define STAGE_TAPE (1 << 12) |
Definition at line 45 of file r_material.h.
Referenced by R_ParseStage(), R_SetSurfaceStageState(), R_StageColor(), and UI_MaterialEditorChangeValue_f().
#define STAGE_TERRAIN (1 << 11) |
Definition at line 44 of file r_material.h.
Referenced by R_ParseStage(), R_SetSurfaceStageState(), R_StageColor(), and UI_MaterialEditorChangeValue_f().
#define STAGE_TEXTURE (1 << 0) |
Definition at line 33 of file r_material.h.
Referenced by R_ParseStage(), and UI_MaterialEditorChangeValue_f().
#define STAGE_TEXTURE_MATRIX |
( \ STAGE_STRETCH | STAGE_ROTATE | STAGE_SCROLL_S | STAGE_SCROLL_T | \ STAGE_SCALE_S | STAGE_SCALE_T \ )
Definition at line 59 of file r_material.h.
Referenced by R_StageTextureMatrix().
#define UPDATE_THRESHOLD 0.02 |
Definition at line 67 of file r_material.h.
typedef struct blendmode_s blendmode_t |
typedef struct material_s material_t |
typedef struct materialStage_s materialStage_t |
enum animLoop_t |
Definition at line 114 of file r_material.h.
void R_LoadMaterials | ( | const char * | map | ) |
Load material definitions for each map that has one.
[in] | map | the base name of the map to load the material for |
Definition at line 891 of file r_material.c.
References material_s::bump, byte, Com_DPrintf(), Com_Parse(), Com_Printf(), Com_SkipPath(), Com_sprintf(), DEBUG_RENDERER, DEFAULT_BUMP, DEFAULT_GLOWSCALE, DEFAULT_HARDNESS, DEFAULT_PARALLAX, DEFAULT_SPECULAR, material_s::flags, materialStage_s::flags, FS_FreeFile(), FS_LoadFile(), image_s::glowmap, materialStage_s::glowscale, material_s::glowscale, material_s::hardness, it_glowmap, it_normalmap, m, image_s::material, MAX_QPATH, Mem_Free, Mem_PoolAlloc, image_s::name, materialStage_s::next, image_s::normalmap, material_s::num_stages, material_s::parallax, qfalse, qtrue, R_CreateMaterialData(), R_FindImage(), R_GetImage(), R_ImageClearMaterials(), R_LoadAnimImages(), r_noTexture, R_ParseStage(), material_s::specular, STAGE_ANIM, material_s::stages, va(), and vid_imagePool.
Referenced by R_ModEndLoading().