|
UFO: Alien Invasion
|
Header file for the render material subsystem. More...

Go to the source code of this file.
Data Structures | |
| struct | dirt_t |
| struct | rotate_t |
| struct | blendmode_t |
| struct | pulse_t |
| struct | stretch_t |
| struct | scroll_t |
| struct | scale_t |
| struct | terrain_t |
| struct | tape_t |
| struct | anim_t |
| struct | materialStage_t |
| struct | material_t |
Macros | |
| #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.0f |
| #define | DEFAULT_PARALLAX 1.0f |
| #define | DEFAULT_SPECULAR 0.2f |
| #define | DEFAULT_HARDNESS 0.2f |
| #define | DEFAULT_GLOWSCALE 1.0f |
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. | |
| void | R_UpdateDefaultMaterial (const char *cvarName, const char *oldValue, const char *newValue, void *data) |
| Change listener callback for material value cvars. | |
Variables | |
| material_t | defaultMaterial |
Header file for the render material subsystem.
Definition in file r_material.h.
| #define DEFAULT_BUMP 1.0f |
Definition at line 150 of file r_material.h.
| #define DEFAULT_GLOWSCALE 1.0f |
Definition at line 154 of file r_material.h.
| #define DEFAULT_HARDNESS 0.2f |
Definition at line 153 of file r_material.h.
| #define DEFAULT_PARALLAX 1.0f |
Definition at line 151 of file r_material.h.
| #define DEFAULT_SPECULAR 0.2f |
Definition at line 152 of file r_material.h.
| #define MAX_ANIM_FRAMES 16 |
Definition at line 64 of file r_material.h.
Referenced by R_ParseStage().
| #define STAGE_ANIM (1 << 14) |
Definition at line 46 of file r_material.h.
Referenced by R_LoadMaterials(), R_ParseStage(), and R_UpdateMaterial().
| #define STAGE_BLEND (1 << 2) |
Definition at line 34 of file r_material.h.
Referenced by R_ParseStage(), and R_SetSurfaceStageState().
| #define STAGE_COLOR (1 << 3) |
Definition at line 35 of file r_material.h.
Referenced by R_CreateSurfaceFlare(), R_ParseStage(), R_SetSurfaceStageState(), and R_StageColor().
| #define STAGE_DIRTMAP (1 << 15) |
Definition at line 47 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 33 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 48 of file r_material.h.
Referenced by R_CreateSurfaceFlare(), R_LoadSurfacesArrays_(), and R_ParseStage().
| #define STAGE_GLOWMAPLINK (1 << 17) |
Definition at line 49 of file r_material.h.
Referenced by R_ParseStage(), and R_StageGlow().
| #define STAGE_LIGHTING (1 << 30) |
Definition at line 52 of file r_material.h.
Referenced by R_ParseStage(), R_StageLighting(), and UI_MaterialEditorChangeValue_f().
| #define STAGE_LIGHTMAP (1 << 13) |
Definition at line 45 of file r_material.h.
Referenced by R_ParseStage(), and R_StageLighting().
| #define STAGE_PULSE (1 << 4) |
Definition at line 36 of file r_material.h.
Referenced by R_ParseStage(), R_SetSurfaceStageState(), and R_UpdateMaterial().
| #define STAGE_RENDER (1 << 31) |
Definition at line 55 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 38 of file r_material.h.
Referenced by R_ParseStage(), R_StageTextureMatrix(), and R_UpdateMaterial().
| #define STAGE_SCALE_S (1 << 9) |
Definition at line 41 of file r_material.h.
Referenced by R_CreateSurfaceFlare(), R_ParseStage(), and R_StageTextureMatrix().
| #define STAGE_SCALE_T (1 << 10) |
Definition at line 42 of file r_material.h.
Referenced by R_CreateSurfaceFlare(), R_ParseStage(), and R_StageTextureMatrix().
| #define STAGE_SCROLL_S (1 << 7) |
Definition at line 39 of file r_material.h.
Referenced by R_ParseStage(), R_StageTextureMatrix(), and R_UpdateMaterial().
| #define STAGE_SCROLL_T (1 << 8) |
Definition at line 40 of file r_material.h.
Referenced by R_ParseStage(), R_StageTextureMatrix(), and R_UpdateMaterial().
| #define STAGE_STRETCH (1 << 5) |
Definition at line 37 of file r_material.h.
Referenced by R_ParseStage(), R_StageTextureMatrix(), and R_UpdateMaterial().
| #define STAGE_TAPE (1 << 12) |
Definition at line 44 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 43 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 32 of file r_material.h.
Referenced by R_ParseStage(), and UI_MaterialEditorChangeValue_f().
| #define STAGE_TEXTURE_MATRIX |
| #define UPDATE_THRESHOLD 0.02 |
Definition at line 66 of file r_material.h.
| 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 920 of file r_material.cpp.
References Com_DPrintf(), Com_Parse(), Com_Printf(), Com_SkipPath(), Com_sprintf(), DEBUG_RENDERER, defaultMaterial, materialStage_t::flags, FS_FreeFile(), FS_LoadFile(), image_t::glowmap, materialStage_t::glowscale, it_glowmap, it_normalmap, m, image_t::material, MAX_QPATH, Mem_Free, Mem_PoolAllocType, image_t::name, materialStage_t::next, image_t::normalmap, Q_streq, Q_strvalid, R_CreateMaterialData(), R_FindImage(), R_GetImage(), R_ImageClearMaterials(), R_LoadAnimImages(), r_materials, r_noTexture, r_overridematerial, R_ParseStage(), STAGE_ANIM, va(), and vid_imagePool.
Referenced by R_ModEndLoading().
| void R_UpdateDefaultMaterial | ( | const char * | cvarName, |
| const char * | oldValue, | ||
| const char * | newValue, | ||
| void * | data ) |
Change listener callback for material value cvars.
Definition at line 1092 of file r_material.cpp.
References data, defaultMaterial, r_default_hardness, and r_default_specular.
Referenced by R_Init(), R_RegisterSystemVars(), and R_ReinitOpenglContext().
|
extern |
Definition at line 34 of file r_material.cpp.
Referenced by R_EnableBumpmap(), R_EnableModelLights(), R_ImageClearMaterials(), R_InitModelProgram(), R_InitWorldProgram(), R_LoadImageData(), R_LoadMaterials(), R_ParseStage(), R_UpdateDefaultMaterial(), and R_UseMaterial().