#include "renderer/r_image.h"
#include "renderer/r_model.h"
#include "renderer/r_program.h"
#include <SDL.h>
Go to the source code of this file.
Data Structures | |
struct | corona_s |
coronas are soft, alpha-blended, rounded polys More... | |
struct | light_t |
struct | sustain_s |
sustains are light flashes which slowly decay More... | |
struct | modelInfo_t |
struct | ptlCmd_s |
struct | ptlDef_s |
struct | ptlArt_s |
struct | ptl_s |
struct | rendererData_t |
struct | renderer_threadstate_s |
Defines | |
#define | RDF_NOWORLDMODEL 1 |
#define | RDF_IRGOGGLES 2 |
#define | RF_TRANSLUCENT 0x00000001 |
#define | RF_BOX 0x00000002 |
#define | RF_PATH 0x01000000 |
#define | RF_ARROW 0x02000000 |
#define | RF_SHADOW 0x00000004 |
#define | RF_BLOOD 0x00000008 |
#define | RF_SELECTED 0x00000010 |
#define | RF_MEMBER 0x00000020 |
#define | RF_ALLIED 0x00000040 |
#define | RF_ACTOR 0x00000080 |
#define | RF_PULSE 0x00000100 |
#define | RF_IRGOGGLES 0x00000200 |
#define | EARTH_RADIUS 8192.0f |
#define | MOON_RADIUS 1024.0f |
#define | SUN_RADIUS 1024.0f |
#define | WEATHER_NONE 0 |
#define | WEATHER_FOG 1 |
#define | VID_NORM_WIDTH 1024 |
#define | VID_NORM_HEIGHT 768 |
#define | MAX_PTL_ART 1024 |
#define | MAX_PTLS 2048 |
#define | MAX_CORONAS 128 |
#define | MAX_GL_LIGHTS 8 |
Typedefs | |
typedef struct corona_s | corona_t |
coronas are soft, alpha-blended, rounded polys | |
typedef struct sustain_s | sustain_t |
sustains are light flashes which slowly decay | |
typedef struct ptlCmd_s | ptlCmd_t |
typedef struct ptlDef_s | ptlDef_t |
typedef enum artType_s | artType_t |
particle art type | |
typedef struct ptlArt_s | ptlArt_t |
typedef struct ptl_s | ptl_t |
typedef struct renderer_threadstate_s | renderer_threadstate_t |
Enumerations | |
enum | artType_s { ART_PIC, ART_MODEL } |
particle art type More... | |
enum | threadstate_t { THREAD_DEAD, THREAD_IDLE, THREAD_CLIENT, THREAD_BSP, THREAD_RENDERER } |
enum | longlines_t { LONGLINES_WRAP, LONGLINES_CHOP, LONGLINES_PRETTYCHOP, LONGLINES_LAST } |
Functions | |
struct model_s * | R_RegisterModelShort (const char *name) |
Tries to load a model. | |
const image_t * | R_RegisterImage (const char *name) |
Searches for an image in the image array. | |
void | R_Color (const vec4_t rgba) |
Change the color to given value. | |
void | R_ModBeginLoading (const char *tiles, qboolean day, const char *pos, const char *mapName) |
Specifies the model that will be used as the world. | |
void | R_SwitchModelMemPoolTag (void) |
After all static models are loaded, switch the pool tag for these models to not free them everytime R_ShutdownModels is called. | |
void | R_LoadImage (const char *name, byte **pic, int *width, int *height) |
Generic image-data loading fucntion. | |
void | R_FontShutdown (void) |
frees the SDL_ttf fonts | |
void | R_FontInit (void) |
void | R_FontRegister (const char *name, int size, const char *path, const char *style) |
void | R_FontSetTruncationMarker (const char *marker) |
void | R_FontTextSize (const char *fontId, const char *text, int maxWidth, longlines_t method, int *width, int *height, int *lines, qboolean *isTruncated) |
Supply information about the size of the text when it is linewrapped and rendered, without actually rendering it. Any of the output parameters may be NULL. | |
int | R_FontDrawString (const char *fontId, align_t align, int x, int y, int absX, int maxWidth, int lineHeight, const char *c, int boxHeight, int scrollPos, int *curLine, longlines_t method) |
Variables | |
rendererData_t | refdef |
renderer_threadstate_t | r_threadstate |
Definition in file cl_renderer.h.
#define EARTH_RADIUS 8192.0f |
Definition at line 54 of file cl_renderer.h.
Referenced by R_SphereInit().
#define MAX_CORONAS 128 |
Definition at line 74 of file cl_renderer.h.
Referenced by R_AddCorona().
#define MAX_GL_LIGHTS 8 |
Definition at line 76 of file cl_renderer.h.
Referenced by R_AddLight(), R_AddSustainedLight(), R_AddSustainedLights(), and R_EnableLights().
#define MAX_PTL_ART 1024 |
Definition at line 64 of file cl_renderer.h.
Referenced by CL_ParticleGetArt().
#define MAX_PTLS 2048 |
Definition at line 65 of file cl_renderer.h.
Referenced by CL_ParticleSpawn().
#define MOON_RADIUS 1024.0f |
Definition at line 55 of file cl_renderer.h.
Referenced by R_SphereInit().
#define RDF_IRGOGGLES 2 |
actor is using ir goggles and everything with RF_IRGOGGLES is visible for him
Definition at line 36 of file cl_renderer.h.
Referenced by CL_ActorDoShoot(), CL_ClearState(), and CL_DoEndRound().
#define RDF_NOWORLDMODEL 1 |
Definition at line 35 of file cl_renderer.h.
Referenced by CL_SequenceRender(), CL_ViewRender(), R_CullEntity(), R_DrawBlendMeshEntities(), R_DrawOpaqueMeshEntities(), R_GetLevelOfDetailForModel(), R_RenderFrame(), and R_SetupFrustum().
#define RF_ACTOR 0x00000080 |
this is an actor
Definition at line 50 of file cl_renderer.h.
Referenced by CL_AddActor(), and CL_AddUGV().
#define RF_ALLIED 0x00000040 |
actor in an allied team (controlled by another player)
Definition at line 49 of file cl_renderer.h.
Referenced by CL_AddActor(), CL_AddUGV(), and R_DrawEntityEffects().
#define RF_ARROW 0x02000000 |
arrow, debugging only
Definition at line 42 of file cl_renderer.h.
Referenced by CL_AddArrow(), R_DrawEntities(), and R_DrawSpecialEntities().
#define RF_BLOOD 0x00000008 |
blood (when dead) for this entity
Definition at line 46 of file cl_renderer.h.
Referenced by CL_AddActor(), and R_DrawEntityEffects().
#define RF_BOX 0x00000002 |
actor selection box
Definition at line 40 of file cl_renderer.h.
Referenced by CL_AddEdictFunc(), CL_AddTargetingBox(), R_DrawEntities(), R_DrawEntityEffects(), and R_DrawSpecialEntities().
#define RF_IRGOGGLES 0x00000200 |
this is visible if the actor uses ir goggles
Definition at line 52 of file cl_renderer.h.
Referenced by CL_AddActor().
#define RF_MEMBER 0x00000020 |
actor in the same team
Definition at line 48 of file cl_renderer.h.
Referenced by CL_AddActor(), CL_AddUGV(), and R_DrawEntityEffects().
#define RF_PATH 0x01000000 |
pathing marker, debugging only
Definition at line 41 of file cl_renderer.h.
Referenced by CL_AddPathingBox(), R_DrawEntities(), and R_DrawSpecialEntities().
#define RF_PULSE 0x00000100 |
#define RF_SELECTED 0x00000010 |
selected actor
Definition at line 47 of file cl_renderer.h.
Referenced by CL_AddActor(), CL_AddUGV(), and R_DrawEntityEffects().
#define RF_SHADOW 0x00000004 |
the following ent flags also draw entity effects shadow (when living) for this entity
Definition at line 45 of file cl_renderer.h.
Referenced by CL_AddActor(), CL_AddUGV(), and R_DrawEntityEffects().
#define RF_TRANSLUCENT 0x00000001 |
entity->flags (render flags)
Definition at line 39 of file cl_renderer.h.
Referenced by R_DrawEntities().
#define SUN_RADIUS 1024.0f |
Definition at line 56 of file cl_renderer.h.
#define VID_NORM_HEIGHT 768 |
Definition at line 62 of file cl_renderer.h.
Referenced by R_InitMiscTexture(), R_UpdateVidDef(), SEQ_Render2D(), UI_DrawTooltip(), UI_WindowNodeLoaded(), and UI_WindowNodeLoading().
#define VID_NORM_WIDTH 1024 |
Definition at line 61 of file cl_renderer.h.
Referenced by Con_Init(), R_InitMiscTexture(), R_UpdateVidDef(), SEQ_Render2D(), UI_DrawNotice(), UI_DrawTooltip(), UI_WindowNodeLoaded(), and UI_WindowNodeLoading().
#define WEATHER_FOG 1 |
Definition at line 59 of file cl_renderer.h.
Referenced by R_EnableFog().
#define WEATHER_NONE 0 |
Definition at line 58 of file cl_renderer.h.
Referenced by CL_ViewLoadMedia().
typedef struct renderer_threadstate_s renderer_threadstate_t |
enum artType_s |
enum longlines_t |
Definition at line 237 of file cl_renderer.h.
enum threadstate_t |
Definition at line 229 of file cl_renderer.h.
void R_Color | ( | const vec4_t | rgba | ) |
Change the color to given value.
[in] | rgba | A pointer to a vec4_t with rgba color value |
Definition at line 818 of file r_state.c.
References color_white, and R_CheckError.
Referenced by MAP_3DMapDrawLine(), MAP_DrawBeam(), MAP_DrawMapMarkers(), MAP_MapDrawEquidistantPoints(), MAP_MapDrawLine(), R_DrawArrow(), R_DrawBox(), R_DrawBspNormals(), R_DrawCircle(), R_DrawCircle2D(), R_DrawCoronas(), R_DrawEntities(), R_DrawEntityEffects(), R_DrawFill(), R_DrawFlareSurfaces(), R_DrawFloor(), R_DrawMaterialSurfaces(), R_DrawMeshModelShell(), R_DrawModelDirect(), R_DrawModelParticle(), R_DrawParticles(), R_DrawPtlCircle(), R_DrawPtlLine(), R_DrawRect(), R_DrawSprite(), R_DrawSurfaces(), R_SetSurfaceStageState(), R_SetSurfaceState(), R_Setup2D(), RADAR_DrawInMap(), SCR_DrawLoading(), SEQ_Render2D(), UI_ButtonNodeDraw(), UI_CustomButtonNodeDraw(), UI_DrawIconInBox(), UI_DrawItem(), UI_DrawNotice(), UI_DrawTooltip(), UI_ImageNodeDraw(), UI_KeyBindingNodeDraw(), UI_LineChartNodeDraw(), UI_OptionListNodeDraw(), UI_OptionTreeNodeDraw(), UI_RadarNodeDrawArrays(), UI_SelectBoxNodeDraw(), UI_StringNodeDraw(), UI_TextEntryNodeDraw(), UI_TextLineNodeDrawText(), and UI_TextNodeDrawText().
int R_FontDrawString | ( | const char * | fontId, | |
align_t | align, | |||
int | x, | |||
int | y, | |||
int | absX, | |||
int | maxWidth, | |||
int | lineHeight, | |||
const char * | c, | |||
int | boxHeight, | |||
int | scrollPos, | |||
int * | curLine, | |||
longlines_t | method | |||
) |
[in] | fontId | the font id (defined in ufos/fonts.ufo) |
[in] | x | Current x position (may differ from absX due to tabs e.g.) |
[in] | y | Current y position (may differ from absY due to linebreaks) |
[in] | absX | Absolute x value for this string |
[in] | absY | Absolute y value for this string |
[in] | maxWidth | Max width - relative from absX |
[in] | lineHeight | The lineheight of that node |
[in] | c | The string to draw |
[in] | scrollPos | Starting line in this node (due to scrolling) |
[in] | curLine | Current line (see lineHeight) |
Definition at line 675 of file r_font.c.
References chunk(), wrapCache_s::chunkIdx, i, chunkCache_t::linenum, wrapCache_s::numChunks, wrapCache_s::numLines, R_FontDrawTexture(), R_FontGenerateTexture(), R_FontWrapText(), R_GetFont(), chunkCache_t::texnum, chunkCache_t::texsize, and chunkCache_t::width.
Referenced by UI_BaseInventoryNodeDraw2(), and UI_DrawString().
void R_FontInit | ( | void | ) |
Definition at line 713 of file r_font.c.
References Com_Error(), Com_Printf(), ERR_FATAL, numChunks, numFonts, and numWraps.
Referenced by CL_NewLanguage(), and R_Init().
void R_FontRegister | ( | const char * | name, | |
int | size, | |||
const char * | path, | |||
const char * | style | |||
) |
Definition at line 741 of file r_font.c.
References i, NUM_FONT_STYLES, Q_strcasecmp, R_FontAnalyze(), and fontRenderStyle_t::renderStyle.
Referenced by UI_RegisterFont().
void R_FontSetTruncationMarker | ( | const char * | marker | ) |
Definition at line 112 of file r_font.c.
References Q_strncpyz(), and truncmarker.
Referenced by CL_NewLanguage().
void R_FontShutdown | ( | void | ) |
frees the SDL_ttf fonts
Definition at line 146 of file r_font.c.
References FS_FreeFile(), i, numFonts, and R_FontCleanCache().
Referenced by CL_NewLanguage(), and R_Shutdown().
void R_FontTextSize | ( | const char * | fontId, | |
const char * | text, | |||
int | maxWidth, | |||
longlines_t | method, | |||
int * | width, | |||
int * | height, | |||
int * | lines, | |||
qboolean * | isTruncated | |||
) |
Supply information about the size of the text when it is linewrapped and rendered, without actually rendering it. Any of the output parameters may be NULL.
[out] | width | receives width in pixels of the longest line in the text |
[out] | height | receives height in pixels when rendered with standard line height |
[out] | lines | receives total number of lines in text, including blank ones |
Definition at line 523 of file r_font.c.
References wrapCache_s::chunkIdx, font_s::height, i, font_s::lineSkip, wrapCache_s::numChunks, wrapCache_s::numLines, R_FontWrapText(), R_GetFont(), chunkCache_t::truncated, and chunkCache_t::width.
Referenced by HUD_DrawMouseCursorText(), HUD_UpdateCursor(), UI_BaseInventoryNodeDrawItems(), UI_BaseInventoryNodeGetItem(), UI_DrawNotice(), UI_DrawTooltip(), UI_MessageGetLines(), UI_StringNodeDrawTooltip(), UI_TabNodeDraw(), UI_TabNodeTabAtPosition(), and UI_TextNodeDrawText().
void R_LoadImage | ( | const char * | name, | |
byte ** | pic, | |||
int * | width, | |||
int * | height | |||
) |
Generic image-data loading fucntion.
[in] | name | (Full) pathname to the image to load. Extension (if given) will be ignored. |
[out] | pic | Image data. |
[out] | width | Width of the loaded image. |
[out] | height | Height of the loaded image. |
Definition at line 141 of file r_image.c.
References Com_Error(), Com_StripExtension(), ERR_FATAL, Img_LoadImage(), MAX_QPATH, Mem_PoolAlloc, and vid_imagePool.
Referenced by MAP_Init().
void R_ModBeginLoading | ( | const char * | tiles, | |
qboolean | day, | |||
const char * | pos, | |||
const char * | mapName | |||
) |
Specifies the model that will be used as the world.
[in] | tiles | The tiles string can be only one map or a list of space seperated map tiles for random assembly. In case of random assembly we also need the pos string. Every tile needs an entry in the pos string, too. |
[in] | day | Load the day lightmap |
[in] | pos | In case of a random map assembly this is the string that holds the world grid positions of the tiles. The positions are x, y and z values. They are just written one after another for every tile in the tiles string and every of the three components must exists for every tile. |
[in] | mapName | The mapname that the get from the server (used to identify the correct name for the materials in case of a random assembly). |
CM_LoadMap
code only loads the collision and pathfinding stuff. Definition at line 1017 of file r_model_brush.c.
References Com_Error(), Com_Parse(), Com_sprintf(), ERR_DROP, i, MAX_QPATH, MAX_VAR, name, PATHFINDING_HEIGHT, PATHFINDING_WIDTH, Q_strncpyz(), R_BeginBuildingLightmaps(), R_ClearActiveLights(), R_FreeWorldImages(), R_ModAddMapTile(), R_ModEndLoading(), r_numMapTiles, and r_numModelsInline.
Referenced by CL_ViewLoadMedia().
const image_t* R_RegisterImage | ( | const char * | name | ) |
Searches for an image in the image array.
[in] | name | The name of the image relative to pics/ |
Definition at line 195 of file r_draw.c.
References it_pic, R_FindImage(), r_noTexture, and va().
Referenced by CL_ParticleLoadArt(), and SEQ_ExecutePrecache().
struct model_s* R_RegisterModelShort | ( | const char * | name | ) | [read] |
Tries to load a model.
[in] | name | The model path or name (with or without extension) - see notes this parameter is always relativ to the game base dir - it can also be relative to the models/ dir in the game folder |
Definition at line 197 of file r_model.c.
References Com_Printf(), Com_sprintf(), i, MAX_QPATH, mod_extensions, qfalse, and R_ModForName().
Referenced by CL_AddBrushModel(), CL_ParseConfigString(), CL_ParticleLoadArt(), CL_PrecacheCharacterModels(), CL_ViewLoadMedia(), CL_ViewPrecacheModels(), LM_Register(), R_Draw2DMapMarkers(), R_Draw3DMapMarkers(), R_DrawModelDirect(), SEQ_ExecuteModel(), SEQ_ExecutePrecache(), UI_DrawModelNode(), and UI_DrawModelNodeWithUIModel().
void R_SwitchModelMemPoolTag | ( | void | ) |
After all static models are loaded, switch the pool tag for these models to not free them everytime R_ShutdownModels is called.
Definition at line 228 of file r_model.c.
References model_s::alias, Com_Printf(), i, it_static, Mem_ChangeTag, MEM_TAG_STATIC_MODELS, mAliasModel_s::meshes, model_s::name, mAliasModel_s::num_meshes, mAliasMesh_s::num_skins, r_noTexture, r_numModels, r_numModelsStatic, mAliasSkin_s::skin, mAliasMesh_s::skins, image_s::type, and vid_modelPool.
Referenced by CL_ViewPrecacheModels().
Definition at line 32 of file r_thread.c.
Referenced by CL_ViewRender(), R_RenderFrame(), and SCR_TimeRefresh_f().
Definition at line 40 of file r_main.c.
Referenced by CL_ActorDoShoot(), CL_ActorMouseTrace(), CL_ClearState(), CL_DoEndRound(), CL_ParseConfigString(), CL_ParseServerData(), CL_SequenceRender(), CL_SetClientState(), CL_ViewCalcFieldOfViewX(), CL_ViewCalcFieldOfViewY(), CL_ViewLoadMedia(), CL_ViewRender(), CL_ViewUpdateRenderData(), CP_StartMissionMap(), MYgluPerspective(), R_AddCorona(), R_AddEntity(), R_AddLight(), R_AddSustainedLight(), R_AddSustainedLights(), R_CullEntity(), R_DrawBlendMeshEntities(), R_DrawBrushModel(), R_DrawCoronas(), R_DrawEntities(), R_DrawEntityEffects(), R_DrawFlareSurfaces(), R_DrawModelDirect(), R_DrawModelParticle(), R_DrawOpaqueMeshEntities(), R_DrawParticles(), R_DrawSurface(), R_EnableFog(), R_EnableLights(), R_EnableShell(), R_GetEntity(), R_GetFreeEntity(), R_GetLevelOfDetailForModel(), R_GetLevelSurfaceLists(), R_ModLoadTexinfo(), R_RecursiveWorldNode(), R_RunThread(), R_Setup3D(), R_SphereRender(), R_SpriteTexcoords(), R_StageTexCoord(), R_Trace(), R_UpdateMaterial(), R_UseWarpProgram(), SCR_TimeRefresh_f(), SCR_UpdateScreen(), and VID_Restart_f().