mirror of
https://github.com/ZDoom/qzdoom.git
synced 2025-02-26 05:41:07 +00:00
- renamed IPortal to HWPortal
This commit is contained in:
parent
3e4dcbe2b4
commit
d757efde96
8 changed files with 22 additions and 22 deletions
|
@ -312,7 +312,7 @@ void FDrawInfo::DrawHUDModel(HUDSprite *huds, FRenderState &state)
|
||||||
renderer.RenderHUDModel(huds->weapon, huds->mx, huds->my);
|
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);
|
auto gp = static_cast<GLPortal *>(p);
|
||||||
gp->SetupStencil(this, gl_RenderState, usestencil);
|
gp->SetupStencil(this, gl_RenderState, usestencil);
|
||||||
|
|
|
@ -47,7 +47,7 @@ struct FDrawInfo : public HWDrawInfo
|
||||||
void DrawIndexed(EDrawType dt, FRenderState &state, int index, int count, bool apply = true) override;
|
void DrawIndexed(EDrawType dt, FRenderState &state, int index, int count, bool apply = true) override;
|
||||||
void DrawModel(GLSprite *spr, FRenderState &state) override;
|
void DrawModel(GLSprite *spr, FRenderState &state) override;
|
||||||
void DrawHUDModel(HUDSprite *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 SetDepthMask(bool on) override;
|
||||||
void SetDepthFunc(int func) override;
|
void SetDepthFunc(int func) override;
|
||||||
|
|
|
@ -46,7 +46,7 @@
|
||||||
|
|
||||||
struct GLEEHorizonPortal;
|
struct GLEEHorizonPortal;
|
||||||
|
|
||||||
class GLPortal : public IPortal
|
class GLPortal : public HWPortal
|
||||||
{
|
{
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
@ -70,7 +70,7 @@ public:
|
||||||
protected:
|
protected:
|
||||||
int level;
|
int level;
|
||||||
|
|
||||||
GLPortal(FPortalSceneState *state, bool local = false) : IPortal(state, local) { }
|
GLPortal(FPortalSceneState *state, bool local = false) : HWPortal(state, local) { }
|
||||||
};
|
};
|
||||||
|
|
||||||
class GLScenePortal : public GLPortal
|
class GLScenePortal : public GLPortal
|
||||||
|
|
|
@ -101,7 +101,7 @@ void FDrawInfo::AddMirrorSurface(GLWall *w)
|
||||||
void FDrawInfo::AddPortal(GLWall *wall, int ptype)
|
void FDrawInfo::AddPortal(GLWall *wall, int ptype)
|
||||||
{
|
{
|
||||||
auto &pstate = GLRenderer->mPortalState;
|
auto &pstate = GLRenderer->mPortalState;
|
||||||
IPortal * portal;
|
HWPortal * portal;
|
||||||
|
|
||||||
wall->MakeVertices(this, false);
|
wall->MakeVertices(this, false);
|
||||||
switch (ptype)
|
switch (ptype)
|
||||||
|
|
|
@ -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;
|
int i = Portals.Size() - 1;
|
||||||
|
|
||||||
|
|
|
@ -54,7 +54,7 @@ struct particle_t;
|
||||||
struct FDynLightData;
|
struct FDynLightData;
|
||||||
struct HUDSprite;
|
struct HUDSprite;
|
||||||
class Clipper;
|
class Clipper;
|
||||||
class IPortal;
|
class HWPortal;
|
||||||
class FFlatVertexGenerator;
|
class FFlatVertexGenerator;
|
||||||
class IRenderQueue;
|
class IRenderQueue;
|
||||||
class HWScenePortalBase;
|
class HWScenePortalBase;
|
||||||
|
@ -149,13 +149,13 @@ struct HWDrawInfo
|
||||||
int FullbrightFlags;
|
int FullbrightFlags;
|
||||||
std::atomic<int> spriteindex;
|
std::atomic<int> spriteindex;
|
||||||
HWScenePortalBase *mClipPortal;
|
HWScenePortalBase *mClipPortal;
|
||||||
IPortal *mCurrentPortal;
|
HWPortal *mCurrentPortal;
|
||||||
//FRotator mAngles;
|
//FRotator mAngles;
|
||||||
IShadowMap *mShadowMap;
|
IShadowMap *mShadowMap;
|
||||||
Clipper *mClipper;
|
Clipper *mClipper;
|
||||||
FRenderViewpoint Viewpoint;
|
FRenderViewpoint Viewpoint;
|
||||||
HWViewpointUniforms VPUniforms; // per-viewpoint uniform state
|
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<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.
|
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;
|
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 RenderBSPNode(void *node);
|
||||||
|
|
||||||
void ClearBuffers();
|
void ClearBuffers();
|
||||||
|
@ -338,7 +338,7 @@ public:
|
||||||
virtual void DrawIndexed(EDrawType dt, FRenderState &state, int index, int count, bool apply = true) = 0;
|
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 DrawModel(GLSprite *spr, FRenderState &state) = 0;
|
||||||
virtual void DrawHUDModel(HUDSprite *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.
|
// Immediate render state change commands. These only change infrequently and should not clutter the render state.
|
||||||
|
|
|
@ -75,7 +75,7 @@ static FString indent;
|
||||||
|
|
||||||
void FPortalSceneState::EndFrame(HWDrawInfo *di)
|
void FPortalSceneState::EndFrame(HWDrawInfo *di)
|
||||||
{
|
{
|
||||||
IPortal * p;
|
HWPortal * p;
|
||||||
|
|
||||||
if (gl_portalinfo)
|
if (gl_portalinfo)
|
||||||
{
|
{
|
||||||
|
@ -115,8 +115,8 @@ void FPortalSceneState::EndFrame(HWDrawInfo *di)
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
bool FPortalSceneState::RenderFirstSkyPortal(int recursion, HWDrawInfo *outer_di)
|
bool FPortalSceneState::RenderFirstSkyPortal(int recursion, HWDrawInfo *outer_di)
|
||||||
{
|
{
|
||||||
IPortal * p;
|
HWPortal * p;
|
||||||
IPortal * best = nullptr;
|
HWPortal * best = nullptr;
|
||||||
unsigned bestindex = 0;
|
unsigned bestindex = 0;
|
||||||
|
|
||||||
// Find the one with the highest amount of lines.
|
// 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);
|
if (gl_portals) outer_di->RenderPortal(p, usestencil);
|
||||||
}
|
}
|
||||||
|
|
|
@ -37,15 +37,15 @@ struct GLHorizonInfo
|
||||||
|
|
||||||
struct FPortalSceneState;
|
struct FPortalSceneState;
|
||||||
|
|
||||||
class IPortal
|
class HWPortal
|
||||||
{
|
{
|
||||||
friend struct FPortalSceneState;
|
friend struct FPortalSceneState;
|
||||||
public:
|
public:
|
||||||
FPortalSceneState * mState;
|
FPortalSceneState * mState;
|
||||||
TArray<GLWall> lines;
|
TArray<GLWall> lines;
|
||||||
|
|
||||||
IPortal(FPortalSceneState *s, bool local);
|
HWPortal(FPortalSceneState *s, bool local);
|
||||||
virtual ~IPortal() {}
|
virtual ~HWPortal() {}
|
||||||
virtual void * GetSource() const = 0; // GetSource MUST be implemented!
|
virtual void * GetSource() const = 0; // GetSource MUST be implemented!
|
||||||
virtual const char *GetName() = 0;
|
virtual const char *GetName() = 0;
|
||||||
virtual bool IsSky() { return false; }
|
virtual bool IsSky() { return false; }
|
||||||
|
@ -92,10 +92,10 @@ struct FPortalSceneState
|
||||||
void StartFrame();
|
void StartFrame();
|
||||||
bool RenderFirstSkyPortal(int recursion, HWDrawInfo *outer_di);
|
bool RenderFirstSkyPortal(int recursion, HWDrawInfo *outer_di);
|
||||||
void EndFrame(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);
|
//if (!local) s->portals.Push(this);
|
||||||
}
|
}
|
||||||
|
@ -104,11 +104,11 @@ inline IPortal::IPortal(FPortalSceneState *s, bool local) : mState(s)
|
||||||
class HWScenePortalBase
|
class HWScenePortalBase
|
||||||
{
|
{
|
||||||
protected:
|
protected:
|
||||||
IPortal *mOwner;
|
HWPortal *mOwner;
|
||||||
public:
|
public:
|
||||||
HWScenePortalBase() {}
|
HWScenePortalBase() {}
|
||||||
virtual ~HWScenePortalBase() {}
|
virtual ~HWScenePortalBase() {}
|
||||||
void SetOwner(IPortal *p) { mOwner = p; }
|
void SetOwner(HWPortal *p) { mOwner = p; }
|
||||||
void ClearClipper(HWDrawInfo *di, Clipper *clipper);
|
void ClearClipper(HWDrawInfo *di, Clipper *clipper);
|
||||||
|
|
||||||
virtual int ClipSeg(seg_t *seg, const DVector3 &viewpos) { return PClip_Inside; }
|
virtual int ClipSeg(seg_t *seg, const DVector3 &viewpos) { return PClip_Inside; }
|
||||||
|
|
Loading…
Reference in a new issue