2016-04-13 06:07:23 +00:00
|
|
|
#ifndef __URDE_IRENDERER_HPP__
|
|
|
|
#define __URDE_IRENDERER_HPP__
|
2015-08-21 00:06:39 +00:00
|
|
|
|
|
|
|
#include <vector>
|
|
|
|
#include "../RetroTypes.hpp"
|
|
|
|
#include "../CToken.hpp"
|
2016-03-04 23:04:53 +00:00
|
|
|
#include "zeus/CAABox.hpp"
|
|
|
|
#include "zeus/CPlane.hpp"
|
2016-07-21 05:21:45 +00:00
|
|
|
#include "zeus/CFrustum.hpp"
|
2016-03-04 23:04:53 +00:00
|
|
|
#include "zeus/CColor.hpp"
|
2016-12-18 04:16:04 +00:00
|
|
|
#include "zeus/CRectangle.hpp"
|
2016-08-08 04:48:18 +00:00
|
|
|
#include "CGraphics.hpp"
|
2015-08-21 00:06:39 +00:00
|
|
|
|
2016-03-04 23:04:53 +00:00
|
|
|
namespace urde
|
2015-08-21 00:06:39 +00:00
|
|
|
{
|
|
|
|
class CMetroidModelInstance;
|
|
|
|
class CLight;
|
|
|
|
class CAreaOctTree;
|
2016-07-26 22:05:59 +00:00
|
|
|
class CParticleGen;
|
2015-08-21 00:06:39 +00:00
|
|
|
class CModel;
|
|
|
|
class CSkinnedModel;
|
2016-07-27 23:06:57 +00:00
|
|
|
class CPVSVisSet;
|
2016-08-17 20:05:23 +00:00
|
|
|
struct CAreaRenderOctTree;
|
2015-08-21 00:06:39 +00:00
|
|
|
|
|
|
|
class IRenderer
|
|
|
|
{
|
|
|
|
public:
|
2017-03-04 04:31:08 +00:00
|
|
|
typedef void(*TDrawableCallback)(const void*, const void*, int);
|
2016-07-21 05:21:45 +00:00
|
|
|
using TReflectionCallback = std::function<void(void*, const zeus::CVector3f&)>;
|
|
|
|
|
2015-11-21 01:16:07 +00:00
|
|
|
enum class EDrawableSorting
|
2015-08-21 00:06:39 +00:00
|
|
|
{
|
2016-08-03 21:53:03 +00:00
|
|
|
SortedCallback,
|
2016-07-26 22:05:59 +00:00
|
|
|
UnsortedCallback
|
2015-08-21 00:06:39 +00:00
|
|
|
};
|
2015-11-21 01:16:07 +00:00
|
|
|
enum class EDebugOption
|
2015-08-21 00:06:39 +00:00
|
|
|
{
|
2017-03-03 07:18:12 +00:00
|
|
|
Zero,
|
|
|
|
One
|
2015-08-21 00:06:39 +00:00
|
|
|
};
|
2015-11-21 01:16:07 +00:00
|
|
|
enum class EPrimitiveType
|
2015-08-21 00:06:39 +00:00
|
|
|
{
|
|
|
|
};
|
|
|
|
|
2016-07-22 02:32:23 +00:00
|
|
|
virtual ~IRenderer() = default;
|
2016-08-07 00:20:02 +00:00
|
|
|
virtual void AddStaticGeometry(const std::vector<CMetroidModelInstance>*, const CAreaRenderOctTree*, int)=0;
|
2016-07-27 23:06:57 +00:00
|
|
|
virtual void EnablePVS(const CPVSVisSet*, u32)=0;
|
|
|
|
virtual void DisablePVS()=0;
|
2016-07-26 22:05:59 +00:00
|
|
|
virtual void RemoveStaticGeometry(const std::vector<CMetroidModelInstance>*)=0;
|
2016-07-28 04:55:06 +00:00
|
|
|
virtual void DrawUnsortedGeometry(int, int, int)=0;
|
|
|
|
virtual void DrawSortedGeometry(int, int, int)=0;
|
|
|
|
virtual void DrawStaticGeometry(int, int, int)=0;
|
2016-07-21 05:21:45 +00:00
|
|
|
virtual void PostRenderFogs()=0;
|
2016-07-26 22:05:59 +00:00
|
|
|
virtual void AddParticleGen(const CParticleGen&)=0;
|
2016-07-21 05:21:45 +00:00
|
|
|
virtual void AddPlaneObject(const void*, const zeus::CAABox&, const zeus::CPlane&, int)=0;
|
|
|
|
virtual void AddDrawable(void const *, const zeus::CVector3f&, const zeus::CAABox&, int, EDrawableSorting)=0;
|
2017-03-04 04:31:08 +00:00
|
|
|
virtual void SetDrawableCallback(TDrawableCallback, const void*)=0;
|
2016-07-21 05:21:45 +00:00
|
|
|
virtual void SetWorldViewpoint(const zeus::CTransform&)=0;
|
|
|
|
virtual void SetPerspective(float, float, float, float, float)=0;
|
|
|
|
virtual void SetPerspective(float, float, float, float)=0;
|
2016-12-18 04:16:04 +00:00
|
|
|
virtual zeus::CRectangle SetViewportOrtho(bool, float, float)=0;
|
2016-07-21 05:21:45 +00:00
|
|
|
virtual void SetClippingPlanes(const zeus::CFrustum&)=0;
|
|
|
|
virtual void SetViewport(int, int, int, int)=0;
|
2016-07-31 02:06:47 +00:00
|
|
|
//virtual void SetDepthReadWrite(bool, bool)=0;
|
|
|
|
//virtual void SetBlendMode_AdditiveAlpha()=0;
|
|
|
|
//virtual void SetBlendMode_AlphaBlended()=0;
|
|
|
|
//virtual void SetBlendMode_NoColorWrite()=0;
|
|
|
|
//virtual void SetBlendMode_ColorMultiply()=0;
|
|
|
|
//virtual void SetBlendMode_InvertDst()=0;
|
|
|
|
//virtual void SetBlendMode_InvertSrc()=0;
|
|
|
|
//virtual void SetBlendMode_Replace()=0;
|
|
|
|
//virtual void SetBlendMode_AdditiveDestColor()=0;
|
2016-07-21 05:21:45 +00:00
|
|
|
virtual void SetDebugOption(EDebugOption, int)=0;
|
|
|
|
virtual void BeginScene()=0;
|
|
|
|
virtual void EndScene()=0;
|
2016-07-31 02:06:47 +00:00
|
|
|
//virtual void BeginPrimitive(EPrimitiveType, int)=0;
|
|
|
|
//virtual void BeginLines(int)=0;
|
|
|
|
//virtual void BeginLineStrip(int)=0;
|
|
|
|
//virtual void BeginTriangles(int)=0;
|
|
|
|
//virtual void BeginTriangleStrip(int)=0;
|
|
|
|
//virtual void BeginTriangleFan(int)=0;
|
|
|
|
//virtual void PrimVertex(const zeus::CVector3f&)=0;
|
|
|
|
//virtual void PrimNormal(const zeus::CVector3f&)=0;
|
|
|
|
//virtual void PrimColor(float, float, float, float)=0;
|
|
|
|
//virtual void PrimColor(const zeus::CColor&)=0;
|
|
|
|
//virtual void EndPrimitive()=0;
|
2016-07-21 05:21:45 +00:00
|
|
|
virtual void SetAmbientColor(const zeus::CColor&)=0;
|
|
|
|
virtual void DrawString(const char*, int, int)=0;
|
|
|
|
virtual u32 GetFPS()=0;
|
2016-07-29 17:38:44 +00:00
|
|
|
//virtual void CacheReflection(TReflectionCallback, void*, bool)=0;
|
2016-07-21 05:21:45 +00:00
|
|
|
virtual void DrawSpaceWarp(const zeus::CVector3f&, float)=0;
|
2016-07-31 02:06:47 +00:00
|
|
|
virtual void DrawThermalModel(const CModel&, const zeus::CColor&, const zeus::CColor&)=0;
|
2016-08-07 00:20:02 +00:00
|
|
|
virtual void DrawXRayOutline(const zeus::CAABox&)=0;
|
2016-07-21 05:21:45 +00:00
|
|
|
virtual void SetWireframeFlags(int)=0;
|
|
|
|
virtual void SetWorldFog(ERglFogMode, float, float, const zeus::CColor&)=0;
|
|
|
|
virtual void RenderFogVolume(const zeus::CColor&, const zeus::CAABox&, const TLockedToken<CModel>*, const CSkinnedModel*)=0;
|
|
|
|
virtual void SetThermal(bool, float, const zeus::CColor&)=0;
|
2016-07-22 19:46:30 +00:00
|
|
|
virtual void SetThermalColdScale(float scale)=0;
|
2016-07-21 05:21:45 +00:00
|
|
|
virtual void DoThermalBlendCold()=0;
|
|
|
|
virtual void DoThermalBlendHot()=0;
|
|
|
|
virtual u32 GetStaticWorldDataSize()=0;
|
2017-03-03 07:18:12 +00:00
|
|
|
virtual void PrepareDynamicLights(const std::vector<CLight>& lights)=0;
|
2017-03-04 04:31:08 +00:00
|
|
|
virtual void SetWorldLightFadeLevel(float level)=0;
|
2015-08-21 00:06:39 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2016-04-13 06:07:23 +00:00
|
|
|
#endif // __URDE_IRENDERER_HPP__
|