29 #include "../idlib/precompiled.h"
75 common->
Printf(
"%i lightDefs, %i interactions, %i areaRefs\n", active, totalIntr, totalRef );
170 common->
Printf(
"idRenderWorldLocal::ResizeInteractionTable: overflowed interactionTableWidth, dumping\n" );
183 if ( entityHandle == -1 ) {
213 common->
Error(
"idRenderWorld::UpdateEntityDef: NULL hModel" );
218 common->
Error(
"idRenderWorld::UpdateEntityDef: index = %i", entityHandle );
246 if ( boundsMatch && originMatch && axisMatch && modelMatch ) {
268 def->
index = entityHandle;
302 if ( entityHandle < 0 || entityHandle >=
entityDefs.
Num() ) {
309 common->
Printf(
"idRenderWorld::FreeEntityDef: handle %i is NULL\n", entityHandle );
339 if ( entityHandle < 0 || entityHandle >=
entityDefs.
Num() ) {
346 common->
Printf(
"idRenderWorld::GetRenderEntity: handle %i is NULL\n", entityHandle );
362 if ( lightHandle == -1 ) {
392 common->
Error(
"idRenderWorld::UpdateLightDef: index = %i", lightHandle );
398 bool justUpdate =
false;
422 light->
index = lightHandle;
425 light->
parms = *rlight;
454 if ( lightHandle < 0 || lightHandle >=
lightDefs.
Num() ) {
461 common->
Printf(
"idRenderWorld::FreeLightDef: handle %i is NULL\n", lightHandle );
483 if ( lightHandle < 0 || lightHandle >=
lightDefs.
Num() ) {
490 common->
Printf(
"idRenderWorld::GetRenderLight: handle %i is NULL\n", lightHandle );
503 int i, areas[10], numAreas;
518 for ( i = 0; i < numAreas; i++ ) {
564 if ( entityHandle < 0 || entityHandle >=
entityDefs.
Num() ) {
565 common->
Error(
"idRenderWorld::ProjectOverlay: index = %i", entityHandle );
609 if ( entityHandle < 0 || entityHandle >=
entityDefs.
Num() ) {
610 common->
Error(
"idRenderWorld::ProjectOverlay: index = %i", entityHandle );
639 if ( entityHandle < 0 || entityHandle >=
entityDefs.
Num() ) {
640 common->
Error(
"idRenderWorld::ProjectOverlay: index = %i", entityHandle );
691 if ( renderView->
fov_x <= 0 || renderView->
fov_y <= 0 ) {
692 common->
Error(
"idRenderWorld::RenderScene: bad FOVs: %f, %f", renderView->
fov_x, renderView->
fov_y );
806 common->
Error(
"idRenderWorld::NumPortalsInArea: bad areanum %i", areaNum );
811 for ( portal = area->
portals ; portal ; portal = portal->
next ) {
829 common->
Error(
"idRenderWorld::GetPortal: areaNum > numAreas" );
834 for ( portal = area->
portals ; portal ; portal = portal->
next ) {
835 if ( count == portalNum ) {
836 ret.
areas[0] = areaNum;
846 common->
Error(
"idRenderWorld::GetPortal: portalNum > numPortals" );
848 memset( &ret, 0,
sizeof( ret ) );
876 if ( nodeNum == 0 ) {
880 nodeNum = -1 - nodeNum;
882 common->
Error(
"idRenderWorld::PointInArea: area out of range" );
903 nodeNum = -1 - nodeNum;
905 for ( i = 0; i < (*numAreas); i++ ) {
906 if ( areas[i] == nodeNum ) {
910 if ( i >= (*numAreas) && (*numAreas) < maxAreas ) {
911 areas[(*numAreas)++] = nodeNum;
928 if ( (*numAreas) >= maxAreas ) {
934 }
while( nodeNum != 0 );
951 assert( bounds[0][0] <= bounds[1][0] && bounds[0][1] <= bounds[1][1] && bounds[0][2] <= bounds[1][2] );
952 assert( bounds[1][0] - bounds[0][0] < 1e4f && bounds[1][1] - bounds[0][1] < 1e4f && bounds[1][2] - bounds[0][2] < 1e4f );
973 idVec3 localStart, localEnd, bestPoint;
983 if ( ( entityHandle < 0 ) || ( entityHandle >=
entityDefs.
Num() ) ) {
984 common->
Printf(
"idRenderWorld::GuiTrace: invalid handle %i\n", entityHandle );
990 common->
Printf(
"idRenderWorld::GuiTrace: handle %i is NULL\n", entityHandle );
1004 float best = 99999.0;
1031 cursor = local.
point - origin;
1033 axisLen[0] = axis[0].
Length();
1034 axisLen[1] = axis[1].
Length();
1036 pt.
x = ( cursor * axis[0] ) / ( axisLen[0] * axisLen[0] );
1037 pt.
y = ( cursor * axis[1] ) / ( axisLen[1] * axisLen[1] );
1054 bool collisionSurface;
1058 float modelMatrix[16];
1059 idVec3 localStart, localEnd;
1064 if ( entityHandle < 0 || entityHandle >=
entityDefs.
Num() ) {
1088 collisionSurface =
false;
1095 collisionSurface =
true;
1106 if ( !surf->
geometry || !shader ) {
1110 if ( collisionSurface ) {
1144 "models/md5/characters/player/d3xp_spplayer.md5mesh",
1145 "models/md5/characters/player/head/d3xp_head.md5mesh",
1146 "models/md5/weapons/pistol_world/worldpistol.md5mesh",
1162 int areas[128], numAreas,
i,
j, numSurfaces;
1164 float modelMatrix[16];
1165 idVec3 localStart, localEnd;
1172 traceBounds.
Clear();
1182 for ( i = 0; i < numAreas; i++ ) {
1196 if ( skipDynamic ) {
1203 const char *exclude;
1208 if ( name == exclude ) {
1239 if ( !surf->
geometry || !shader ) {
1246 const char *exclude;
1251 if ( name == exclude ) {
1288 traceBounds.
Clear();
1315 if ( nodeNum < 0 ) {
1319 if ( nodeNum == 0 ) {
1320 if ( parentNodeNum != -1 ) {
1323 results->
point = p1;
1335 if ( t1 >= 0.0
f && t2 >= 0.0
f ) {
1339 if ( t1 < 0.0
f && t2 < 0.0
f ) {
1344 frac = t1 / (t1 - t2);
1345 midf = p1f + frac*(p2f - p1f);
1346 mid[0] = p1[0] + frac*(p2[0] - p1[0]);
1347 mid[1] = p1[1] + frac*(p2[1] - p1[1]);
1348 mid[2] = p1[2] + frac*(p2[2] - p1[2]);
1363 return ( results.
fraction < 1.0f );
1388 common->
Error(
"idRenderWorldLocal::AddEntityRefToArea: NULL def" );
1420 lref->
light = light;
1470 int msec = end -
start;
1493 interactionTable[
index ] = inter;
1498 common->
Printf(
"interactionTable size: %i bytes\n", size );
1548 if ( nodeNum < 0 ) {
1550 int areaNum = -1 - nodeNum;
1593 if ( sd <= -sphere->GetRadius() ) {
1602 front = back =
false;
1603 #ifdef MACOS_X //loop unrolling & pre-fetching for performance
1605 const float plane3 = node->
plane[3];
1606 float D0, D1, D2, D3;
1608 for ( i = 0 ; i < numPoints - 4; i+=4 ) {
1609 D0 =
points[i+0] * norm + plane3;
1610 D1 =
points[i+1] * norm + plane3;
1611 if ( !front && D0 >= 0.0
f ) {
1613 }
else if ( !back && D0 <= 0.0
f ) {
1616 D2 =
points[i+1] * norm + plane3;
1617 if ( !front && D1 >= 0.0
f ) {
1619 }
else if ( !back && D1 <= 0.0
f ) {
1622 D3 =
points[i+1] * norm + plane3;
1623 if ( !front && D2 >= 0.0
f ) {
1625 }
else if ( !back && D2 <= 0.0
f ) {
1629 if ( !front && D3 >= 0.0
f ) {
1631 }
else if ( !back && D3 <= 0.0
f ) {
1634 if ( back && front ) {
1638 if(!(back && front)) {
1639 for (; i < numPoints ; i++ ) {
1644 }
else if ( d <= 0.0
f ) {
1647 if ( back && front ) {
1653 for ( i = 0 ; i < numPoints ; i++ ) {
1659 }
else if ( d <= 0.0
f ) {
1662 if ( back && front ) {
1688 float radSquared, lr;
1697 for ( i = 0; i < numPoints; i++ ) {
1700 mid *= ( 1.0f / numPoints );
1704 for ( i = 0; i < numPoints; i++ ) {
1707 if ( lr > radSquared ) {
1712 idSphere sphere( mid, sqrt( radSquared ) );
1747 static float arrowCos[40];
1748 static float arrowSin[40];
1749 static int arrowStep;
1751 DebugLine( color, start, end, lifetime );
1759 for (i = 0, a = 0; a < 360.0f; a += arrowStep, i++) {
1763 arrowCos[
i] = arrowCos[0];
1764 arrowSin[
i] = arrowSin[0];
1767 forward = end -
start;
1770 for (i = 0, a = 0; a < 360.0f; a += arrowStep, i++) {
1771 s = 0.5f * size * arrowCos[
i];
1772 v1 = end - size * forward;
1773 v1 = v1 + s *
right;
1774 s = 0.5f * size * arrowSin[
i];
1777 s = 0.5f * size * arrowCos[i+1];
1778 v2 = end - size * forward;
1779 v2 = v2 + s *
right;
1780 s = 0.5f * size * arrowSin[i+1];
1801 lastPoint = origin + w[w.
GetNumPoints()-1].ToVec3() * axis;
1803 point = origin + w[
i].ToVec3() * axis;
1804 DebugLine( color, lastPoint, point, lifetime, depthTest );
1817 idVec3 left, up, point, lastPoint;
1822 lastPoint = origin + up;
1823 for ( i = 1; i <= numSteps; i++ ) {
1826 DebugLine( color, lastPoint, point, lifetime, depthTest );
1842 lastArray = (
idVec3 *) _alloca16( num *
sizeof(
idVec3 ) );
1844 for ( n = 1; n <
num; n++ ) {
1845 lastArray[
n] = lastArray[0];
1848 for ( i = 15; i <= 360; i += 15 ) {
1854 for ( n = 0, j = 15; j <= 360; j += 15, n++ ) {
1859 DebugLine( color, lastp, p, lifetime,depthTest );
1860 DebugLine( color, lastp, lastArray[n], lifetime, depthTest );
1862 lastArray[
n] = lastp;
1881 for ( i = 0; i < 8; i++ ) {
1882 v[
i][0] = org[0] + bounds[(i^(i>>1))&1][0];
1883 v[
i][1] = org[1] + bounds[(i>>1)&1][1];
1884 v[
i][2] = org[2] + bounds[(i>>2)&1][2];
1886 for ( i = 0; i < 4; i++ ) {
1887 DebugLine( color, v[i], v[(i+1)&3], lifetime );
1888 DebugLine( color, v[4+i], v[4+((i+1)&3)], lifetime );
1889 DebugLine( color, v[i], v[4+i], lifetime );
1903 for ( i = 0; i < 4; i++ ) {
1904 DebugLine( color, v[i], v[(i+1)&3], lifetime );
1905 DebugLine( color, v[4+i], v[4+((i+1)&3)], lifetime );
1906 DebugLine( color, v[i], v[4+i], lifetime );
1922 for ( i = 0; i < 4; i++ ) {
1923 DebugLine( color, v[i], v[(i+1)&3], lifetime );
1925 if ( showFromOrigin ) {
1926 for ( i = 0; i < 4; i++ ) {
1931 for ( i = 0; i < 4; i++ ) {
1932 DebugLine( color, v[4+i], v[4+((i+1)&3)], lifetime );
1933 DebugLine( color, v[i], v[4+i], lifetime );
1952 axis[2].Normalize();
1953 axis[2].NormalVectors( axis[0], axis[1] );
1957 lastp2 = top + radius2 * axis[1];
1959 if ( radius1 == 0.0
f ) {
1960 for ( i = 20; i <= 360; i += 20 ) {
1962 p2 = top + d * radius2;
1963 DebugLine( color, lastp2, p2, lifetime );
1968 lastp1 = apex + radius1 * axis[1];
1969 for ( i = 20; i <= 360; i += 20 ) {
1971 p1 = apex + d * radius1;
1972 p2 = top + d * radius2;
1973 DebugLine( color, lastp1, p1, lifetime );
1974 DebugLine( color, lastp2, p2, lifetime );
1991 end = start + axis[0] * -20.0f;
1993 end = start + axis[1] * +20.0f;
1995 end = start + axis[1] * -20.0f;
1997 end = start + axis[2] * +20.0f;
1999 end = start + axis[2] * -20.0f;
2028 float centerx, centery, dScale, hScale, vScale;
2039 bounds[0][0] = bounds[1][0] = dScale;
2040 bounds[0][1] = -( rect.
x1 - centerx ) / centerx * hScale;
2041 bounds[1][1] = -( rect.
x2 - centerx ) / centerx * hScale;
2042 bounds[0][2] = ( rect.
y1 - centery ) / centery * vScale;
2043 bounds[1][2] = ( rect.
y2 - centery ) / centery * vScale;
2045 for ( i = 0; i < 4; i++ ) {
2046 p[
i].
x = bounds[0][0];
2047 p[
i].
y = bounds[(i^(i>>1))&1].y;
2048 p[
i].
z = bounds[(i>>1)&1].
z;
2051 for ( i = 0; i < 4; i++ ) {
2052 DebugLine( color, p[i], p[(i+1)&3],
false );
2076 RB_AddDebugText( text, origin, scale, color, viewAxis, align, lifetime, depthTest );
2095 if ( !(*shader)->IsDrawn() ) {
2128 if ( customShader ) {
2131 if ( shader->
Deform() ) {
2134 return const_cast<idMaterial *
>(customShader);
2137 if ( !skin || !shader ) {
idRenderWorldLocal * world
const idMaterial * lightShader
void AddEntityRefToArea(idRenderEntityLocal *def, portalArea_t *area)
virtual qhandle_t AddEntityDef(const renderEntity_t *re)
idRenderModel * dynamicModel
void R_LockSurfaceScene(viewDef_t *parms)
virtual void RegenerateWorld()
GLsizei const GLfloat * points
const idVec3 & GetOrigin(void) const
virtual void DebugCircle(const idVec4 &color, const idVec3 &origin, const idVec3 &dir, const float radius, const int numSteps, const int lifetime=0, const bool depthTest=false)
void RB_ClearDebugPolygons(int time)
const idVec3 & GetOrigin(void) const
void cross(float a[], float b[], float c[])
assert(prefInfo.fullscreenBtn)
virtual const renderLight_t * GetRenderLight(qhandle_t lightHandle) const
const idVec3 & Normal(void) const
virtual exitPortal_t GetPortal(int areaNum, int portalNum)
idBounds projectionBounds
areaReference_t lightRefs
virtual void DebugPolygon(const idVec4 &color, const idWinding &winding, const int lifeTime=0, const bool depthTest=false)
virtual void UpdateEntityDef(qhandle_t entityHandle, const renderEntity_t *re)
void ToPoints(idVec3 points[8]) const
bool generateAllInteractionsCalled
static bool CreateProjectionInfo(decalProjectionInfo_t &info, const idFixedWinding &winding, const idVec3 &projectionOrigin, const bool parallel, const float fadeDepth, const idMaterial *material, const int startTime)
void R_FreeEntityDefOverlay(idRenderEntityLocal *def)
idInteraction * lightNext
void R_CreateLightRefs(idRenderLightLocal *light)
static float Tan16(float a)
float GetFloat(void) const
class idGuiModel * guiModel
virtual void RemoveDecals(qhandle_t entityHandle)
virtual qhandle_t AddLightDef(const renderLight_t *rlight)
virtual void UpdateLightDef(qhandle_t lightHandle, const renderLight_t *rlight)
idRenderModel * R_EntityDefDynamicModel(idRenderEntityLocal *def)
GLenum GLenum GLenum GLenum GLenum scale
areaReference_t * entityRefs
float Distance(const idVec3 &v) const
bool R_GlobalShaderOverride(const idMaterial **shader)
void RB_AddDebugPolygon(const idVec4 &color, const idWinding &winding, const int lifeTime, const bool depthTest)
void R_SurfaceToTextureAxis(const srfTriangles_t *tri, idVec3 &origin, idVec3 axis[3])
idList< idRenderEntityLocal * > entityDefs
const idMaterial * material
idCVar r_useEntityCallbacks("r_useEntityCallbacks","1", CVAR_RENDERER|CVAR_BOOL,"if 0, issue the callback immediately at update time, rather than defering")
virtual void DebugSphere(const idVec4 &color, const idSphere &sphere, const int lifetime=0, bool depthTest=false)
int Sys_Milliseconds(void)
virtual void RenderScene(const renderView_t *renderView)
virtual void DebugClearPolygons(int time)
const idMaterial * RemapShaderBySkin(const idMaterial *shader) const
const idMaterial * shader
deform_t Deform(void) const
int GetEntityGui(void) const
idCVar r_useNodeCommonChildren("r_useNodeCommonChildren","1", CVAR_RENDERER|CVAR_BOOL,"stop pushing reference bounds early when possible")
const char * GetName(void) const
virtual void DebugArrow(const idVec4 &color, const idVec3 &start, const idVec3 &end, int size, const int lifetime=0)
void PushVolumeIntoTree_r(idRenderEntityLocal *def, idRenderLightLocal *light, const idSphere *sphere, int numPoints, const idVec3(*points), int nodeNum)
idRenderWorldLocal * primaryWorld
virtual const char * Name() const =0
void ToPoints(idVec3 points[8]) const
void R_RegenerateWorld_f(const idCmdArgs &args)
virtual const idMaterial * FindMaterial(const char *name, bool makeDefault=true)=0
virtual void DebugBox(const idVec4 &color, const idBox &box, const int lifetime=0)
idCVar r_lockSurfaces("r_lockSurfaces","0", CVAR_RENDERER|CVAR_BOOL,"allow moving the view point without changing the composition of the scene, including culling")
virtual void DebugBounds(const idVec4 &color, const idBounds &bounds, const idVec3 &org=vec3_origin, const int lifetime=0)
virtual bool Trace(modelTrace_t &trace, const idVec3 &start, const idVec3 &end, const float radius, bool skipDynamic=true, bool skipPlayer=false) const
void OrthogonalBasis(idVec3 &left, idVec3 &up) const
deferredEntityCallback_t callback
idCVar r_skipUpdates("r_skipUpdates","0", CVAR_RENDERER|CVAR_BOOL,"1 = don't accept any entity or light updates, making everything static")
const idMaterial * customShader
void * R_ClearedFrameAlloc(int bytes)
float GetNearDistance(void) const
static float Cos16(float a)
void WriteFreeEntity(qhandle_t handle)
virtual dynamicModel_t IsDynamicModel() const =0
idList< idRenderLightLocal * > lightDefs
void WriteRenderView(const renderView_t *renderView)
void ResizeInteractionTable()
static float Sin16(float a)
static idRenderModelOverlay * Alloc(void)
virtual void DebugLine(const idVec4 &color, const idVec3 &start, const idVec3 &end, const int lifetime=0, const bool depthTest=false)
idCVar r_debugArrowStep("r_debugArrowStep","120", CVAR_RENDERER|CVAR_ARCHIVE|CVAR_INTEGER,"step size of arrow cone line rotation in degrees", 0, 120)
bool AllowOverlays(void) const
void R_CreateEntityRefs(idRenderEntityLocal *def)
materialCoverage_t Coverage(void) const
doublePortal_t * doublePortals
bool AddPoint(const idVec3 &v)
GLfloat GLfloat GLfloat v2
idInteraction ** interactionTable
virtual void DrawText(const char *text, const idVec3 &origin, float scale, const idVec4 &color, const idMat3 &viewAxis, const int align=1, const int lifetime=0, bool depthTest=false)
GLuint GLuint GLsizei count
void WriteFreeLight(qhandle_t handle)
virtual void FreeLightDef(qhandle_t lightHandle)
virtual const renderEntity_t * GetRenderEntity(qhandle_t entityHandle) const
int GetNumPoints(void) const
idRenderModelDecal * decals
virtual bool FastWorldTrace(modelTrace_t &trace, const idVec3 &start, const idVec3 &end) const
GLubyte GLubyte GLubyte GLubyte w
const int LUDICROUS_INDEX
idRenderWorldLocal * world
void CreateOverlay(const idRenderModel *model, const idPlane localTextureAxis[2], const idMaterial *material)
areaReference_t * references
localTrace_t R_LocalTrace(const idVec3 &start, const idVec3 &end, const float radius, const srfTriangles_t *tri)
bool R_IssueEntityDefCallback(idRenderEntityLocal *def)
float GetRadius(void) const
virtual bool ModelTrace(modelTrace_t &trace, qhandle_t entityHandle, const idVec3 &start, const idVec3 &end, const float radius) const
void R_FreeEntityDefDerivedData(idRenderEntityLocal *def, bool keepDecals, bool keepCachedDynamicModel)
srfTriangles_t * geometry
const idDeclSkin * customSkin
const idMaterial * globalMaterial
const idMaterial * R_RemapShaderBySkin(const idMaterial *shader, const idDeclSkin *skin, const idMaterial *customShader)
idInteraction * firstInteraction
int GetInteger(void) const
struct areaReference_s * ownerNext
virtual const modelSurface_t * Surface(int surfaceNum) const =0
virtual void DebugScreenRect(const idVec4 &color, const idScreenRect &rect, const viewDef_t *viewDef, const int lifetime=0)
const int GetSurfaceFlags(void) const
idBlockAlloc< areaReference_t, 1024 > areaReferenceAllocator
virtual void ProjectDecalOntoWorld(const idFixedWinding &winding, const idVec3 &projectionOrigin, const bool parallel, const float fadeDepth, const idMaterial *material, const int startTime)
virtual ~idRenderWorldLocal()
void FromTransformedBounds(const idBounds &bounds, const idVec3 &origin, const idMat3 &axis)
void BoundsInAreas_r(int nodeNum, const idBounds &bounds, int *areas, int *numAreas, int maxAreas) const
virtual int NearestJoint(int surfaceNum, int a, int c, int b) const =0
void RenderViewToViewport(const renderView_t *renderView, idScreenRect *viewport)
GLubyte GLubyte GLubyte a
virtual void Printf(const char *fmt,...) id_attribute((format(printf
idCVar r_znear("r_znear","3", CVAR_RENDERER|CVAR_FLOAT,"near Z clip plane distance", 0.001f, 200.0f)
float RB_DrawTextLength(const char *text, float scale, int len)
idCVar r_useInteractionTable("r_useInteractionTable","1", CVAR_RENDERER|CVAR_BOOL,"create a full entityDefs * lightDefs table to make finding interactions faster")
virtual idBounds Bounds(const struct renderEntity_s *ent=NULL) const =0
virtual void DebugWinding(const idVec4 &color, const idWinding &w, const idVec3 &origin, const idMat3 &axis, const int lifetime=0, const bool depthTest=false)
void R_ListRenderLightDefs_f(const idCmdArgs &args)
GLdouble GLdouble GLdouble top
void RecurseProcBSP_r(modelTrace_t *results, int parentNodeNum, int nodeNum, float p1f, float p2f, const idVec3 &p1, const idVec3 &p2) const
idDeclManager * declManager
virtual int NumPortalsInArea(int areaNum)
virtual int NumAreas(void) const
int interactionTableHeight
virtual void DebugClearLines(int time)
void R_ListRenderEntityDefs_f(const idCmdArgs &args)
static const float TWO_PI
virtual guiPoint_t GuiTrace(qhandle_t entityHandle, const idVec3 start, const idVec3 end) const
idCVar r_skipFrontEnd("r_skipFrontEnd","0", CVAR_RENDERER|CVAR_BOOL,"bypasses all front end work, but 2D gui rendering still draws")
const char * GetString(void) const
void R_CreateLightDefFogPortals(idRenderLightLocal *ldef)
void R_GlobalPointToLocal(const float modelMatrix[16], const idVec3 &in, idVec3 &out)
virtual void GenerateAllInteractions()
void R_RenderView(viewDef_t *parms)
int Append(const type &obj)
void R_FreeEntityDefDecals(idRenderEntityLocal *def)
const char * playerModelExcludeList[]
float DrawTextLength(const char *text, float scale, int len=0)
idRenderModel * prelightModel
bool LineIntersection(const idVec3 &start, const idVec3 &end) const
void CreateLightDefInteractions(idRenderLightLocal *ldef)
virtual void SetRenderView(const renderView_t *renderView)
void * R_ClearedStaticAlloc(int bytes)
int interactionTableWidth
bool IsCleared(void) const
void R_DeriveLightData(idRenderLightLocal *light)
bool IntersectsBounds(const idBounds &a) const
portalArea_t * portalAreas
virtual void DebugCone(const idVec4 &color, const idVec3 &apex, const idVec3 &dir, float radius1, float radius2, const int lifetime=0)
virtual void DebugAxis(const idVec3 &origin, const idMat3 &axis)
virtual int PointInArea(const idVec3 &point) const
void CreateDecal(const idRenderModel *model, const decalProjectionInfo_t &localInfo)
idRenderModelOverlay * overlay
struct portalArea_s * area
virtual int NumBaseSurfaces() const =0
idRenderEntityLocal * entity
class idUserInterface * gui[MAX_RENDERENTITY_GUI]
areaReference_t entityRefs
void AddLightRefToArea(idRenderLightLocal *light, portalArea_t *area)
static idRenderModelDecal * Alloc(void)
struct areaReference_s * areaNext
const renderEntity_t * entity
static void GlobalProjectionInfoToLocal(decalProjectionInfo_t &localInfo, const decalProjectionInfo_t &info, const idVec3 &origin, const idMat3 &axis)
idRenderLightLocal * light
idVec3 initialViewAreaOrigin
void PushVolumeIntoTree(idRenderEntityLocal *def, idRenderLightLocal *light, int numPoints, const idVec3(*points))
struct doublePortal_s * doublePortal
idInteraction * firstInteraction
idRenderWorldLocal * renderWorld
void RB_AddDebugLine(const idVec4 &color, const idVec3 &start, const idVec3 &end, const int lifeTime, const bool depthTest)
int PlaneSide(const idPlane &plane, const float epsilon=ON_EPSILON) const
virtual void ProjectDecal(qhandle_t entityHandle, const idFixedWinding &winding, const idVec3 &projectionOrigin, const bool parallel, const float fadeDepth, const idMaterial *material, const int startTime)
void R_StaticFree(void *data)
void R_LocalPointToGlobal(const float modelMatrix[16], const idVec3 &in, idVec3 &out)
virtual void Error(const char *fmt,...) id_attribute((format(printf
const idMaterial * shader
idRenderEntityLocal * entityDef
virtual void ProjectOverlay(qhandle_t entityHandle, const idPlane localTextureAxis[2], const idMaterial *material)
void R_AxisToModelMatrix(const idMat3 &axis, const idVec3 &origin, float modelMatrix[16])
void R_FreeLightDefDerivedData(idRenderLightLocal *ldef)
virtual void FreeEntityDef(qhandle_t entityHandle)
idCVar r_materialOverride("r_materialOverride","", CVAR_RENDERER,"overrides all materials", idCmdSystem::ArgCompletion_Decl< DECL_MATERIAL >)
void RB_ClearDebugLines(int time)
void NormalVectors(idVec3 &left, idVec3 &down) const
renderView_t primaryRenderView
void R_ClearEntityDefDynamicModel(idRenderEntityLocal *def)
struct areaReference_s * areaPrev
virtual void DebugFrustum(const idVec4 &color, const idFrustum &frustum, const bool showFromOrigin=false, const int lifetime=0)
const char * playerMaterialExcludeList[]
void RB_ClearDebugText(int time)
virtual int BoundsInAreas(const idBounds &bounds, int *areas, int maxAreas) const
void RB_AddDebugText(const char *text, const idVec3 &origin, float scale, const idVec4 &color, const idMat3 &viewAxis, const int align, const int lifetime, const bool depthTest)
virtual int NumSurfaces() const =0