2022-10-09 05:13:17 +00:00
|
|
|
#ifndef _IRENDERER
|
|
|
|
#define _IRENDERER
|
2022-09-13 04:26:54 +00:00
|
|
|
|
|
|
|
#include "types.h"
|
2022-10-24 21:44:55 +00:00
|
|
|
#include "rstl/pair.hpp"
|
2022-12-01 16:11:09 +00:00
|
|
|
#include "rstl/vector.hpp"
|
2022-09-13 04:26:54 +00:00
|
|
|
|
2022-11-25 21:02:17 +00:00
|
|
|
#include "Kyoto/TToken.hpp"
|
|
|
|
|
2022-10-17 15:54:45 +00:00
|
|
|
class CTransform4f;
|
|
|
|
class CParticleGen;
|
|
|
|
class IObjectStore;
|
|
|
|
class COsContext;
|
|
|
|
class CMemorySys;
|
|
|
|
class CResFactory;
|
2022-10-24 21:44:55 +00:00
|
|
|
class CAABox;
|
2022-10-28 09:01:30 +00:00
|
|
|
class CVector2f;
|
|
|
|
class CVector3f;
|
2022-11-25 21:02:17 +00:00
|
|
|
class CModel;
|
2022-12-01 16:11:09 +00:00
|
|
|
class CFrustumPlanes;
|
2022-11-25 21:02:17 +00:00
|
|
|
class CSkinnedModel;
|
|
|
|
class CColor;
|
2022-12-01 16:11:09 +00:00
|
|
|
class CLight;
|
|
|
|
class CPVSVisSet;
|
2022-10-17 15:54:45 +00:00
|
|
|
|
2022-09-13 04:26:54 +00:00
|
|
|
class IRenderer {
|
|
|
|
public:
|
2022-11-15 13:45:15 +00:00
|
|
|
typedef void (*TDrawableCallback)(const void*, const void*, int);
|
2022-11-15 01:08:30 +00:00
|
|
|
|
2022-09-13 04:26:54 +00:00
|
|
|
enum EDrawableSorting {
|
|
|
|
kDS_SortedCallback,
|
|
|
|
kDS_UnsortedCallback,
|
|
|
|
};
|
|
|
|
|
|
|
|
virtual ~IRenderer();
|
|
|
|
// TODO vtable
|
2022-10-17 15:02:11 +00:00
|
|
|
|
|
|
|
virtual void AddStaticGeometry();
|
2022-12-01 16:11:09 +00:00
|
|
|
virtual void EnablePVS(const CPVSVisSet& set, int areaIdx);
|
2022-10-17 15:02:11 +00:00
|
|
|
virtual void DisablePVS();
|
|
|
|
virtual void RemoveStaticGeometry();
|
2022-12-01 16:11:09 +00:00
|
|
|
virtual void DrawUnsortedGeometry(int areaIdx, int mask, int targetMask);
|
|
|
|
virtual void DrawSortedGeometry(int areaIdx, int mask, int targetMask);
|
|
|
|
virtual void DrawStaticGeometry(int areaIdx, int mask, int targetMask);
|
|
|
|
virtual void DrawAreaGeometry(int areaIdx, int mask, int targetMask);
|
2022-10-17 15:02:11 +00:00
|
|
|
virtual void PostRenderFogs();
|
|
|
|
virtual void SetModelMatrix(const CTransform4f& xf);
|
|
|
|
virtual void AddParticleGen(const CParticleGen& gen);
|
2022-10-23 13:44:06 +00:00
|
|
|
virtual void AddParticleGen2();
|
|
|
|
virtual void AddPlaneObject();
|
|
|
|
virtual void AddDrawable(const void* obj, const CVector3f& pos, const CAABox& bounds, int mode,
|
|
|
|
IRenderer::EDrawableSorting sorting);
|
2022-11-15 01:08:30 +00:00
|
|
|
virtual void SetDrawableCallback(TDrawableCallback cb, void* ctx);
|
2022-10-23 13:44:06 +00:00
|
|
|
virtual void SetWorldViewpoint();
|
2022-11-14 02:18:45 +00:00
|
|
|
virtual void SetPerspective1(float, float, float, float, float);
|
2022-10-23 13:44:06 +00:00
|
|
|
virtual void SetPerspective2();
|
|
|
|
virtual rstl::pair< CVector2f, CVector2f > SetViewportOrtho(bool centered, float znear,
|
|
|
|
float zfar);
|
2022-12-01 16:11:09 +00:00
|
|
|
virtual void SetClippingPlanes(const CFrustumPlanes&);
|
|
|
|
virtual void SetViewport(int left, int right, int width, int height);
|
2022-10-23 13:44:06 +00:00
|
|
|
virtual void SetDepthReadWrite(bool read, bool update);
|
|
|
|
virtual void SetBlendMode_AdditiveAlpha();
|
|
|
|
virtual void SetBlendMode_AlphaBlended();
|
|
|
|
virtual void SetBlendMode_NoColorWrite();
|
|
|
|
virtual void SetBlendMode_ColorMultiply();
|
|
|
|
virtual void SetBlendMode_InvertDst();
|
|
|
|
virtual void SetBlendMode_InvertSrc();
|
2022-11-25 12:41:28 +00:00
|
|
|
virtual void SetBlendMode_Replace();
|
2022-10-23 13:44:06 +00:00
|
|
|
virtual void SetBlendMode_AdditiveDestColor();
|
2022-11-25 12:41:28 +00:00
|
|
|
|
|
|
|
virtual void SetDebugOption();
|
|
|
|
virtual void BeginScene();
|
|
|
|
virtual void EndScene();
|
|
|
|
virtual void BeginPrimitive(GXPrimitive prim, int count);
|
|
|
|
virtual void BeginLines(int nverts);
|
|
|
|
virtual void BeginLineStrip(int nverts);
|
|
|
|
virtual void BeginTriangles(int nverts);
|
|
|
|
virtual void BeginTriangleStrip(int nverts);
|
|
|
|
virtual void BeginTriangleFan(int nverts);
|
|
|
|
virtual void PrimVertex(const CVector3f& vtx);
|
|
|
|
virtual void PrimNormal(const CVector3f& nrm);
|
|
|
|
virtual void PrimColor(float r, float g, float b, float a);
|
|
|
|
virtual void PrimColor(const CColor& color);
|
|
|
|
virtual void EndPrimitive();
|
|
|
|
virtual void SetAmbientColor(const CColor& color);
|
|
|
|
virtual void DrawString();
|
|
|
|
virtual void GetFPS();
|
|
|
|
virtual void CacheReflection();
|
|
|
|
virtual void DrawSpaceWarp();
|
|
|
|
virtual void DrawThermalModel();
|
|
|
|
virtual void DrawModelDisintegrate();
|
|
|
|
virtual void DrawModelFlat();
|
|
|
|
virtual void SetWireframeFlags();
|
|
|
|
virtual void SetWorldFog();
|
|
|
|
virtual void RenderFogVolume(const CColor&, const CAABox&, const TLockedToken< CModel >*,
|
|
|
|
const CSkinnedModel*);
|
|
|
|
virtual void SetThermal();
|
|
|
|
virtual void SetThermalColdScale();
|
|
|
|
virtual void DoThermalBlendCold();
|
|
|
|
virtual void DoThermalBlendHot();
|
|
|
|
virtual void GetStaticWorldDataSize();
|
|
|
|
virtual void SetGXRegister1Color();
|
|
|
|
virtual void SetWorldLightFadeLevel();
|
|
|
|
virtual void Something();
|
2022-12-01 16:11:09 +00:00
|
|
|
virtual void PrepareDynamicLights(const rstl::vector<CLight>& lights);
|
2022-09-13 04:26:54 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
namespace Renderer {
|
|
|
|
IRenderer* AllocateRenderer(IObjectStore&, COsContext&, CMemorySys&, CResFactory&);
|
2022-10-09 05:13:17 +00:00
|
|
|
}; // namespace Renderer
|
2022-09-13 04:26:54 +00:00
|
|
|
|
2022-10-09 05:13:17 +00:00
|
|
|
#endif // _IRENDERER
|