- renamed IPortal to HWPortal

This commit is contained in:
Christoph Oelckers 2018-10-24 07:35:22 +02:00
parent 3e4dcbe2b4
commit d757efde96
8 changed files with 22 additions and 22 deletions

View file

@ -312,7 +312,7 @@ void FDrawInfo::DrawHUDModel(HUDSprite *huds, FRenderState &state)
renderer.RenderHUDModel(huds->weapon, huds->mx, huds->my);
}
void FDrawInfo::RenderPortal(IPortal *p, bool usestencil)
void FDrawInfo::RenderPortal(HWPortal *p, bool usestencil)
{
auto gp = static_cast<GLPortal *>(p);
gp->SetupStencil(this, gl_RenderState, usestencil);

View file

@ -47,7 +47,7 @@ struct FDrawInfo : public HWDrawInfo
void DrawIndexed(EDrawType dt, FRenderState &state, int index, int count, bool apply = true) override;
void DrawModel(GLSprite *spr, FRenderState &state) override;
void DrawHUDModel(HUDSprite *spr, FRenderState &state) override;
void RenderPortal(IPortal *p, bool stencil) override;
void RenderPortal(HWPortal *p, bool stencil) override;
void SetDepthMask(bool on) override;
void SetDepthFunc(int func) override;

View file

@ -46,7 +46,7 @@
struct GLEEHorizonPortal;
class GLPortal : public IPortal
class GLPortal : public HWPortal
{
private:
@ -70,7 +70,7 @@ public:
protected:
int level;
GLPortal(FPortalSceneState *state, bool local = false) : IPortal(state, local) { }
GLPortal(FPortalSceneState *state, bool local = false) : HWPortal(state, local) { }
};
class GLScenePortal : public GLPortal

View file

@ -101,7 +101,7 @@ void FDrawInfo::AddMirrorSurface(GLWall *w)
void FDrawInfo::AddPortal(GLWall *wall, int ptype)
{
auto &pstate = GLRenderer->mPortalState;
IPortal * portal;
HWPortal * portal;
wall->MakeVertices(this, false);
switch (ptype)

View file

@ -260,7 +260,7 @@ void HWDrawInfo::SetupView(float vx, float vy, float vz, bool mirror, bool plane
//
//-----------------------------------------------------------------------------
IPortal * HWDrawInfo::FindPortal(const void * src)
HWPortal * HWDrawInfo::FindPortal(const void * src)
{
int i = Portals.Size() - 1;

View file

@ -54,7 +54,7 @@ struct particle_t;
struct FDynLightData;
struct HUDSprite;
class Clipper;
class IPortal;
class HWPortal;
class FFlatVertexGenerator;
class IRenderQueue;
class HWScenePortalBase;
@ -149,13 +149,13 @@ struct HWDrawInfo
int FullbrightFlags;
std::atomic<int> spriteindex;
HWScenePortalBase *mClipPortal;
IPortal *mCurrentPortal;
HWPortal *mCurrentPortal;
//FRotator mAngles;
IShadowMap *mShadowMap;
Clipper *mClipper;
FRenderViewpoint Viewpoint;
HWViewpointUniforms VPUniforms; // per-viewpoint uniform state
TArray<IPortal *> Portals;
TArray<HWPortal *> Portals;
TArray<GLDecal *> Decals[2]; // the second slot is for mirrors which get rendered in a separate pass.
TArray<HUDSprite> hudsprites; // These may just be stored by value.
@ -263,7 +263,7 @@ public:
return (screen->hwcaps & RFL_NO_CLIP_PLANES) && VPUniforms.mClipLine.X > -1000000.f;
}
IPortal * FindPortal(const void * src);
HWPortal * FindPortal(const void * src);
void RenderBSPNode(void *node);
void ClearBuffers();
@ -338,7 +338,7 @@ public:
virtual void DrawIndexed(EDrawType dt, FRenderState &state, int index, int count, bool apply = true) = 0;
virtual void DrawModel(GLSprite *spr, FRenderState &state) = 0;
virtual void DrawHUDModel(HUDSprite *spr, FRenderState &state) = 0;
virtual void RenderPortal(IPortal *p, bool usestencil) = 0;
virtual void RenderPortal(HWPortal *p, bool usestencil) = 0;
// Immediate render state change commands. These only change infrequently and should not clutter the render state.

View file

@ -75,7 +75,7 @@ static FString indent;
void FPortalSceneState::EndFrame(HWDrawInfo *di)
{
IPortal * p;
HWPortal * p;
if (gl_portalinfo)
{
@ -115,8 +115,8 @@ void FPortalSceneState::EndFrame(HWDrawInfo *di)
//-----------------------------------------------------------------------------
bool FPortalSceneState::RenderFirstSkyPortal(int recursion, HWDrawInfo *outer_di)
{
IPortal * p;
IPortal * best = nullptr;
HWPortal * p;
HWPortal * best = nullptr;
unsigned bestindex = 0;
// Find the one with the highest amount of lines.
@ -150,7 +150,7 @@ bool FPortalSceneState::RenderFirstSkyPortal(int recursion, HWDrawInfo *outer_di
}
void FPortalSceneState::RenderPortal(IPortal *p, bool usestencil, HWDrawInfo *outer_di)
void FPortalSceneState::RenderPortal(HWPortal *p, bool usestencil, HWDrawInfo *outer_di)
{
if (gl_portals) outer_di->RenderPortal(p, usestencil);
}

View file

@ -37,15 +37,15 @@ struct GLHorizonInfo
struct FPortalSceneState;
class IPortal
class HWPortal
{
friend struct FPortalSceneState;
public:
FPortalSceneState * mState;
TArray<GLWall> lines;
IPortal(FPortalSceneState *s, bool local);
virtual ~IPortal() {}
HWPortal(FPortalSceneState *s, bool local);
virtual ~HWPortal() {}
virtual void * GetSource() const = 0; // GetSource MUST be implemented!
virtual const char *GetName() = 0;
virtual bool IsSky() { return false; }
@ -92,10 +92,10 @@ struct FPortalSceneState
void StartFrame();
bool RenderFirstSkyPortal(int recursion, HWDrawInfo *outer_di);
void EndFrame(HWDrawInfo *outer_di);
void RenderPortal(IPortal *p, bool usestencil, HWDrawInfo *outer_di);
void RenderPortal(HWPortal *p, bool usestencil, HWDrawInfo *outer_di);
};
inline IPortal::IPortal(FPortalSceneState *s, bool local) : mState(s)
inline HWPortal::HWPortal(FPortalSceneState *s, bool local) : mState(s)
{
//if (!local) s->portals.Push(this);
}
@ -104,11 +104,11 @@ inline IPortal::IPortal(FPortalSceneState *s, bool local) : mState(s)
class HWScenePortalBase
{
protected:
IPortal *mOwner;
HWPortal *mOwner;
public:
HWScenePortalBase() {}
virtual ~HWScenePortalBase() {}
void SetOwner(IPortal *p) { mOwner = p; }
void SetOwner(HWPortal *p) { mOwner = p; }
void ClearClipper(HWDrawInfo *di, Clipper *clipper);
virtual int ClipSeg(seg_t *seg, const DVector3 &viewpos) { return PClip_Inside; }