mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-23 04:22:34 +00:00
- added a RenderState virtual to the FrameBuffer class.
This commit is contained in:
parent
70d30feb4c
commit
90585c4931
7 changed files with 22 additions and 1 deletions
|
@ -514,6 +514,11 @@ void OpenGLFrameBuffer::UpdatePalette()
|
|||
GLRenderer->ClearTonemapPalette();
|
||||
}
|
||||
|
||||
FRenderState* OpenGLFrameBuffer::RenderState()
|
||||
{
|
||||
return &gl_RenderState;
|
||||
}
|
||||
|
||||
|
||||
//===========================================================================
|
||||
//
|
||||
|
|
|
@ -27,6 +27,7 @@ public:
|
|||
void InitializeState() override;
|
||||
void Update() override;
|
||||
|
||||
FRenderState* RenderState() override;
|
||||
void CleanForRestart() override;
|
||||
void UpdatePalette() override;
|
||||
uint32_t GetCaps() override;
|
||||
|
|
|
@ -530,6 +530,12 @@ void PolyFrameBuffer::CleanForRestart()
|
|||
swdrawer.reset();
|
||||
}
|
||||
|
||||
FRenderState* PolyFrameBuffer::RenderState()
|
||||
{
|
||||
return mRenderState.get();
|
||||
}
|
||||
|
||||
|
||||
void PolyFrameBuffer::PrecacheMaterial(FMaterial *mat, int translation)
|
||||
{
|
||||
if (mat->Source()->GetUseType() == ETextureType::SWCanvas) return;
|
||||
|
|
|
@ -35,6 +35,7 @@ public:
|
|||
|
||||
void InitializeState() override;
|
||||
|
||||
FRenderState* RenderState() override;
|
||||
void CleanForRestart() override;
|
||||
void PrecacheMaterial(FMaterial *mat, int translation) override;
|
||||
void UpdatePalette() override;
|
||||
|
|
|
@ -67,6 +67,7 @@ class FLightBuffer;
|
|||
struct HWDrawInfo;
|
||||
class FMaterial;
|
||||
class FGameTexture;
|
||||
class FRenderState;
|
||||
|
||||
enum EHWCaps
|
||||
{
|
||||
|
@ -270,6 +271,7 @@ public:
|
|||
virtual void BeginFrame() {}
|
||||
virtual void SetWindowSize(int w, int h) {}
|
||||
virtual void StartPrecaching() {}
|
||||
virtual FRenderState* RenderState() { return nullptr; }
|
||||
|
||||
virtual int GetClientWidth() = 0;
|
||||
virtual int GetClientHeight() = 0;
|
||||
|
|
|
@ -584,7 +584,7 @@ void VulkanFrameBuffer::DrawScene(HWDrawInfo *di, int drawmode)
|
|||
}
|
||||
|
||||
GetRenderState()->SetDepthMask(true);
|
||||
if (!gl_no_skyclear) screen->mPortalState->RenderFirstSkyPortal(recursion, di, *GetRenderState());
|
||||
if (!gl_no_skyclear) mPortalState->RenderFirstSkyPortal(recursion, di, *GetRenderState());
|
||||
|
||||
di->RenderScene(*GetRenderState());
|
||||
|
||||
|
@ -995,3 +995,8 @@ void VulkanFrameBuffer::UpdateShadowMap()
|
|||
{
|
||||
mPostprocess->UpdateShadowMap();
|
||||
}
|
||||
|
||||
FRenderState* VulkanFrameBuffer::RenderState()
|
||||
{
|
||||
return mRenderState.get();
|
||||
}
|
||||
|
|
|
@ -35,6 +35,7 @@ public:
|
|||
VkRenderState *GetRenderState() { return mRenderState.get(); }
|
||||
VkPostprocess *GetPostprocess() { return mPostprocess.get(); }
|
||||
VkRenderBuffers *GetBuffers() { return mActiveRenderBuffers; }
|
||||
FRenderState* RenderState() override;
|
||||
|
||||
void FlushCommands(bool finish, bool lastsubmit = false);
|
||||
|
||||
|
|
Loading…
Reference in a new issue