diff options
author | aap <aap@papnet.eu> | 2019-05-15 16:52:37 +0200 |
---|---|---|
committer | aap <aap@papnet.eu> | 2019-05-15 16:52:37 +0200 |
commit | 600bf0351476a5a21aabb5429132ddf7f52ac0b9 (patch) | |
tree | d8e48b3a581679e33830fb7c98ed69e1e242e2c2 /src/render/Renderer.h | |
download | re3-600bf0351476a5a21aabb5429132ddf7f52ac0b9.tar re3-600bf0351476a5a21aabb5429132ddf7f52ac0b9.tar.gz re3-600bf0351476a5a21aabb5429132ddf7f52ac0b9.tar.bz2 re3-600bf0351476a5a21aabb5429132ddf7f52ac0b9.tar.lz re3-600bf0351476a5a21aabb5429132ddf7f52ac0b9.tar.xz re3-600bf0351476a5a21aabb5429132ddf7f52ac0b9.tar.zst re3-600bf0351476a5a21aabb5429132ddf7f52ac0b9.zip |
Diffstat (limited to '')
-rw-r--r-- | src/render/Renderer.h | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/src/render/Renderer.h b/src/render/Renderer.h new file mode 100644 index 00000000..970d6ba5 --- /dev/null +++ b/src/render/Renderer.h @@ -0,0 +1,59 @@ +#pragma once + +class CEntity; + +extern bool gbShowPedRoadGroups; +extern bool gbShowCarRoadGroups; +extern bool gbShowCollisionPolys; + +extern bool gbDontRenderBuildings; +extern bool gbDontRenderBigBuildings; +extern bool gbDontRenderPeds; +extern bool gbDontRenderObjects; + +class CVehicle; +class CPtrList; + +class CRenderer +{ + static int32 &ms_nNoOfVisibleEntities; + static CEntity **ms_aVisibleEntityPtrs; // [2000]; + static int32 &ms_nNoOfInVisibleEntities; + static CEntity **ms_aInVisibleEntityPtrs; // [150]; + + static CVector &ms_vecCameraPosition; + static CVehicle *&m_pFirstPersonVehicle; + static bool &m_loadingPriority; +public: + static void Init(void); + // TODO: PreRender, needs CHeli and CShadows + + static void RenderRoads(void); + static void RenderFadingInEntities(void); + static void RenderEverythingBarRoads(void); + static void RenderVehiclesButNotBoats(void); + static void RenderBoats(void); + static void RenderOneRoad(CEntity *); + static void RenderOneNonRoad(CEntity *); + static void RenderFirstPersonVehicle(void); + + static int32 SetupEntityVisibility(CEntity *ent); + static int32 SetupBigBuildingVisibility(CEntity *ent); + + static void ConstructRenderList(void); + static void ScanWorld(void); + static void RequestObjectsInFrustum(void); + static void ScanSectorPoly(RwV2d *poly, int32 numVertices, void (*scanfunc)(CPtrList *)); + static void ScanBigBuildingList(CPtrList &list); + static void ScanSectorList(CPtrList *lists); + static void ScanSectorList_Priority(CPtrList *lists); + static void ScanSectorList_Subway(CPtrList *lists); + static void ScanSectorList_RequestModels(CPtrList *lists); + + static void SortBIGBuildings(void); + static void SortBIGBuildingsForSectorList(CPtrList *list); + + static bool ShouldModelBeStreamed(CEntity *ent); + static bool IsEntityCullZoneVisible(CEntity *ent); + static bool IsVehicleCullZoneVisible(CEntity *ent); +}; |