UFO: Alien Invasion
|
#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 | modelInfo_t |
struct | ptlCmd_s |
struct | ptlDef_s |
struct | ptlArt_s |
struct | ptl_s |
struct | rendererData_t |
struct | renderer_threadstate_s |
Macros | |
#define | RDF_NOWORLDMODEL 1 |
#define | RDF_IRGOGGLES 2 |
#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 More... | |
typedef struct ptlCmd_s | ptlCmd_t |
typedef struct ptlDef_s | ptlDef_t |
typedef enum artType_s | artType_t |
particle art type More... | |
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 | |
void | R_Color (const vec4_t rgba) |
Change the color to given value. More... | |
void | R_ModBeginLoading (const char *tiles, bool day, const char *pos, const char *mapName, const char *mapZone) |
Specifies the model that will be used as the world. More... | |
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. More... | |
void | R_LoadImage (const char *name, byte **pic, int *width, int *height) |
Generic image-data loading fucntion. More... | |
void | R_FontShutdown (void) |
frees the SDL_ttf fonts More... | |
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, bool *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 nullptr. More... | |
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 |
#define MAX_CORONAS 128 |
Definition at line 53 of file cl_renderer.h.
Referenced by R_AddCorona().
#define MAX_GL_LIGHTS 8 |
Definition at line 55 of file cl_renderer.h.
Referenced by R_AddLight(), R_AddSustainedLight(), R_DisableLights(), R_DisableSpotLight(), R_EnableModelLights(), R_EnableWorldLights(), and R_UpdateSustainedLights().
#define MAX_PTL_ART 1024 |
Definition at line 43 of file cl_renderer.h.
Referenced by CL_ParticleGetArt().
#define MAX_PTLS 2048 |
Definition at line 44 of file cl_renderer.h.
Referenced by CL_ParticleSpawn(), and TEST_F().
#define RDF_IRGOGGLES 2 |
actor is using ir goggles and everything with RF_IRGOGGLES is visible for him
Definition at line 35 of file cl_renderer.h.
Referenced by CL_ActorDoShoot(), CL_ActorSelect(), CL_ClearState(), CL_DoEndRound(), and R_DrawAliasModel().
#define RDF_NOWORLDMODEL 1 |
Definition at line 34 of file cl_renderer.h.
Referenced by CL_ViewRender(), R_CullEntity(), R_DrawBlendMeshEntities(), R_DrawOpaqueMeshEntities(), R_GetLevelOfDetailForModel(), R_RenderFrame(), R_Setup2D(), R_Setup3D(), R_SetupFrustum(), and SEQ_Render3D().
#define VID_NORM_HEIGHT 768 |
Definition at line 41 of file cl_renderer.h.
Referenced by uiWindowNode::onLoading(), R_InitMiscTexture(), R_Setup3D(), R_UpdateVidDef(), SEQ_Render(), UI_DrawTooltip(), and UI_Window_FlagFullscreen().
#define VID_NORM_WIDTH 1024 |
Definition at line 40 of file cl_renderer.h.
Referenced by Con_Init(), uiWindowNode::onLoading(), R_InitMiscTexture(), R_Setup3D(), R_UpdateVidDef(), SEQ_Render(), SEQ_Render2D(), UI_DrawNotice(), UI_DrawTooltip(), and UI_Window_FlagFullscreen().
#define WEATHER_FOG 1 |
Definition at line 38 of file cl_renderer.h.
Referenced by R_EnableFog().
#define WEATHER_NONE 0 |
Definition at line 37 of file cl_renderer.h.
Referenced by SP_worldspawn().
typedef struct renderer_threadstate_s renderer_threadstate_t |
enum artType_s |
enum longlines_t |
Enumerator | |
---|---|
LONGLINES_WRAP | |
LONGLINES_CHOP | |
LONGLINES_PRETTYCHOP | |
LONGLINES_LAST |
Definition at line 217 of file cl_renderer.h.
enum threadstate_t |
Enumerator | |
---|---|
THREAD_DEAD | |
THREAD_IDLE | |
THREAD_CLIENT | |
THREAD_BSP | |
THREAD_RENDERER |
Definition at line 209 of file cl_renderer.h.
Change the color to given value.
[in] | rgba | A pointer to a vec4_t with rgba color value |
Definition at line 1011 of file r_state.cpp.
References color_white, and R_CheckError.
Referenced by uiStringNode::draw(), uiLineChartNode::draw(), uiOptionTreeNode::draw(), uiSelectBoxNode::draw(), uiButtonNode::draw(), uiOptionListNode::draw(), uiTextEntryNode::draw(), uiImageNode::draw(), uiTextListNode::drawText(), uiText2Node::drawText(), uiTextNode::drawText(), GAME_GetImportData(), R_DrawAliasModel(), R_DrawArrow(), R_DrawBoundingBoxes(), R_DrawBox(), R_DrawBspNormals(), R_DrawCircle(), R_DrawCoronas(), R_DrawEntityEffects(), R_DrawFills(), R_DrawFlareSurfaces(), R_DrawFloor(), R_DrawMaterialSurfaces(), R_DrawMeshModelShell(), R_DrawMeshShadow(), R_DrawModelDirect(), R_DrawModelParticle(), R_DrawParticles(), R_DrawPtlLine(), R_DrawRect(), R_DrawSprite(), R_DrawSurfaces(), R_EndFrame(), R_RenderFrame(), R_SetSurfaceStageState(), R_SetSurfaceState(), R_Setup2D(), Weather::render(), SEQ_Render2D(), UI_DrawItem(), UI_DrawNotice(), UI_DrawSpriteInBox(), UI_DrawTooltip(), UI_MessageDraw(), and UI_RadarNodeDrawArrays().
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) |
align | Alignment of the text inside the text zone | |
[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] | maxWidth | Max width - relative from absX |
[in] | lineHeight | The lineheight of that node |
[in] | c | The string to draw |
boxHeight | Number of line the box can contain. If <= 0 the value is autogenerated according to the number of line of the text input | |
[in] | scrollPos | Starting line in this node (due to scrolling) |
[in] | curLine | Current line (see lineHeight) |
method | Explain the way we manage line overflow |
Definition at line 687 of file r_font.cpp.
References 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().
Definition at line 722 of file r_font.cpp.
References Com_Error(), Com_Printf(), ERR_FATAL, numChunks, numFonts, numWraps, and OBJZERO.
Referenced by CL_NewLanguage(), R_Init(), ParticleTest::SetUpTestCase(), ScriptTest::SetUpTestCase(), FootStepTest::SetUpTestCase(), MapDefStatsTest::SetUpTestCase(), MapDefMassRMATest::SetUpTestCase(), MapDefTest::SetUpTestCase(), CampaignTest::SetUpTestCase(), and UI_Restart_f().
Definition at line 750 of file r_font.cpp.
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.cpp.
References Q_strncpyz(), and truncmarker.
Referenced by CL_NewLanguage().
frees the SDL_ttf fonts
Definition at line 144 of file r_font.cpp.
References i, Mem_Free, numFonts, OBJZERO, and R_FontCleanCache().
Referenced by CL_NewLanguage(), R_Shutdown(), and UI_Restart_f().
void R_FontTextSize | ( | const char * | fontId, |
const char * | text, | ||
int | maxWidth, | ||
longlines_t | method, | ||
int * | width, | ||
int * | height, | ||
int * | lines, | ||
bool * | 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 nullptr.
[in] | fontId | the font id (defined in ufos/fonts.ufo) |
[in] | text | The text to check |
maxWidth | Max width available | |
method | Line overflow method | |
[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 |
[out] | isTruncated | receives true, if the text must be trucated |
Definition at line 524 of file r_font.cpp.
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 uiButtonNode::draw(), uiTabNode::draw(), uiText2Node::drawText(), uiTextNode::drawText(), uiStringNode::drawTooltip(), HUD_UpdateCursor(), UI_BaseInventoryNodeDrawItems(), UI_BaseInventoryNodeGetItem(), UI_DrawNotice(), UI_DrawTooltip(), UI_MessageGetLines(), and UI_TabNodeTabAtPosition().
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 152 of file r_image.cpp.
References Com_Error(), Com_StripExtension(), ERR_FATAL, Img_LoadImage(), MAX_QPATH, Mem_PoolAllocTypeN, Q_strnull(), and vid_imagePool.
Referenced by GAME_GetImportData().
void R_ModBeginLoading | ( | const char * | tiles, |
bool | day, | ||
const char * | pos, | ||
const char * | mapName, | ||
const char * | mapZone | ||
) |
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). |
[in] | mapZone | The terrain type for texture replacement |
CM_LoadMap
code only loads the collision and pathfinding stuff. Definition at line 1098 of file r_model_brush.cpp.
References Com_Error(), Com_Parse(), Com_sprintf(), ERR_DROP, i, MAX_QPATH, MAX_VAR, name, PATHFINDING_HEIGHT, PATHFINDING_WIDTH, Q_strncpyz(), R_BeginBuildingLightmaps(), R_ClearGrass(), R_ClearStaticLights(), R_ModAddMapTile(), R_ModEndLoading(), r_numMapTiles, and r_numModelsInline.
Referenced by CL_ViewLoadMedia().
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 299 of file r_model.cpp.
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().
renderer_threadstate_t r_threadstate |
Definition at line 34 of file r_thread.cpp.
Referenced by CL_ViewRender(), R_RenderFrame(), and SCR_TimeRefresh_f().
rendererData_t refdef |
Definition at line 45 of file r_main.cpp.
Referenced by CL_ActorDoShoot(), CL_ActorSelect(), CL_ClearState(), CL_DoEndRound(), CL_GetWorldCoordsUnderMouse(), CL_ParseConfigString(), CL_ParseServerData(), CL_ViewCalcFieldOfViewX(), CL_ViewCalcFieldOfViewY(), CL_ViewLoadMedia(), CL_ViewRender(), CL_ViewUpdateRenderData(), MYgluPerspective(), R_AddCorona(), R_AddEntity(), R_AddLight(), R_AddStaticLight(), R_AddSustainedLight(), R_CalcTransform(), R_CleanupDepthBuffer(), R_ClearStaticLights(), R_CullEntity(), R_Draw2DArray(), R_DrawAliasFrameLerp(), R_DrawAliasModel(), R_DrawAliasModelBuffer(), R_DrawAliasStatic(), R_DrawAliasTags(), R_DrawArrow(), R_DrawBlendMeshEntities(), R_DrawBox(), R_DrawBspNormals(), R_DrawChars(), R_DrawCircle(), R_DrawCoronas(), R_DrawEntityEffects(), R_DrawFills(), R_DrawFlareSurfaces(), R_DrawFlatGeoscape(), R_DrawFloor(), R_DrawGrass(), R_DrawImageArray(), R_DrawMeshModelShell(), R_DrawMeshShadow(), R_DrawModelDirect(), R_DrawModelParticle(), R_DrawNullModel(), R_DrawOpaqueMeshEntities(), R_DrawParticles(), R_DrawPtlLine(), R_DrawQuad(), R_DrawRect(), R_DrawSprite(), R_DrawStarfield(), R_DrawSurfaces(), R_DrawSurfaceStage(), R_EnableFog(), R_EnableModelLights(), R_EnableShell(), R_EnableWorldLights(), R_FontDrawTexture(), R_GetEntity(), R_GetEntityLists(), R_GetFreeEntity(), R_GetLevelOfDetailForModel(), R_GetLevelSurfaceLists(), R_InitModelProgram(), R_InitWarpProgram(), R_InitWorldProgram(), R_RunThread(), R_Setup2D(), R_Setup3D(), R_SphereRender(), R_SphereRenderTris(), R_SpriteTexcoords(), R_StageTexCoord(), R_Trace(), R_UpdateLightList(), R_UpdateMaterial(), R_UpdateShadowOrigin(), R_UpdateSustainedLights(), R_UseModelProgram(), R_UseProgram(), R_UseWarpProgram(), R_UseWorldProgram(), Weather::render(), SCR_TimeRefresh_f(), SCR_UpdateScreen(), SEQ_Render3D(), SP_worldspawn(), and VID_Restart_f().