mirror of
https://github.com/ZDoom/qzdoom.git
synced 2025-01-31 04:50:48 +00:00
- fix compile errors
This commit is contained in:
parent
bb47230f79
commit
82ebcc4946
3 changed files with 19 additions and 25 deletions
|
@ -113,12 +113,7 @@ void PolyVertexInputAssembly::Load(PolyTriangleThreadData *thread, const void *v
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
void PolyDataBuffer::BindRange(size_t start, size_t length)
|
void PolyDataBuffer::BindRange(FRenderState *state, size_t start, size_t length)
|
||||||
{
|
{
|
||||||
GetPolyFrameBuffer()->GetRenderState()->Bind(this, (uint32_t)start, (uint32_t)length);
|
static_cast<PolyRenderState*>(state)->Bind(this, (uint32_t)start, (uint32_t)length);
|
||||||
}
|
|
||||||
|
|
||||||
void PolyDataBuffer::BindBase()
|
|
||||||
{
|
|
||||||
GetPolyFrameBuffer()->GetRenderState()->Bind(this, 0, (uint32_t)buffersize);
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -75,8 +75,7 @@ public:
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
void BindRange(size_t start, size_t length) override;
|
void BindRange(FRenderState *state, size_t start, size_t length) override;
|
||||||
void BindBase() override;
|
|
||||||
|
|
||||||
int bindingpoint;
|
int bindingpoint;
|
||||||
};
|
};
|
||||||
|
|
|
@ -87,7 +87,7 @@ PolyFrameBuffer::~PolyFrameBuffer()
|
||||||
|
|
||||||
void PolyFrameBuffer::InitializeState()
|
void PolyFrameBuffer::InitializeState()
|
||||||
{
|
{
|
||||||
gl_vendorstring = "Poly";
|
vendorstring = "Poly";
|
||||||
hwcaps = RFL_SHADER_STORAGE_BUFFER | RFL_BUFFER_STORAGE;
|
hwcaps = RFL_SHADER_STORAGE_BUFFER | RFL_BUFFER_STORAGE;
|
||||||
glslversion = 4.50f;
|
glslversion = 4.50f;
|
||||||
uniformblockalignment = 1;
|
uniformblockalignment = 1;
|
||||||
|
@ -97,7 +97,7 @@ void PolyFrameBuffer::InitializeState()
|
||||||
|
|
||||||
mVertexData = new FFlatVertexBuffer(GetWidth(), GetHeight());
|
mVertexData = new FFlatVertexBuffer(GetWidth(), GetHeight());
|
||||||
mSkyData = new FSkyVertexBuffer;
|
mSkyData = new FSkyVertexBuffer;
|
||||||
mViewpoints = new GLViewpointBuffer;
|
mViewpoints = new HWViewpointBuffer;
|
||||||
mLights = new FLightBuffer();
|
mLights = new FLightBuffer();
|
||||||
|
|
||||||
CheckCanvas();
|
CheckCanvas();
|
||||||
|
@ -200,8 +200,8 @@ sector_t *PolyFrameBuffer::RenderView(player_t *player)
|
||||||
{
|
{
|
||||||
// To do: this is virtually identical to FGLRenderer::RenderView and should be merged.
|
// To do: this is virtually identical to FGLRenderer::RenderView and should be merged.
|
||||||
|
|
||||||
mRenderState->SetVertexBuffer(screen->mVertexData);
|
mRenderState->SetVertexBuffer(mVertexData);
|
||||||
screen->mVertexData->Reset();
|
mVertexData->Reset();
|
||||||
|
|
||||||
sector_t *retsec;
|
sector_t *retsec;
|
||||||
if (!V_IsHardwareRenderer())
|
if (!V_IsHardwareRenderer())
|
||||||
|
@ -224,8 +224,8 @@ sector_t *PolyFrameBuffer::RenderView(player_t *player)
|
||||||
if (cl_capfps || r_NoInterpolate) r_viewpoint.TicFrac = 1.;
|
if (cl_capfps || r_NoInterpolate) r_viewpoint.TicFrac = 1.;
|
||||||
else r_viewpoint.TicFrac = I_GetTimeFrac();
|
else r_viewpoint.TicFrac = I_GetTimeFrac();
|
||||||
|
|
||||||
screen->mLights->Clear();
|
mLights->Clear();
|
||||||
screen->mViewpoints->Clear();
|
mViewpoints->Clear();
|
||||||
|
|
||||||
// NoInterpolateView should have no bearing on camera textures, but needs to be preserved for the main view below.
|
// NoInterpolateView should have no bearing on camera textures, but needs to be preserved for the main view below.
|
||||||
bool saved_niv = NoInterpolateView;
|
bool saved_niv = NoInterpolateView;
|
||||||
|
@ -281,7 +281,7 @@ sector_t *PolyFrameBuffer::RenderViewpoint(FRenderViewpoint &mainvp, AActor * ca
|
||||||
for (int eye_ix = 0; eye_ix < vrmode->mEyeCount; ++eye_ix)
|
for (int eye_ix = 0; eye_ix < vrmode->mEyeCount; ++eye_ix)
|
||||||
{
|
{
|
||||||
const auto &eye = vrmode->mEyes[eye_ix];
|
const auto &eye = vrmode->mEyes[eye_ix];
|
||||||
screen->SetViewportRects(bounds);
|
SetViewportRects(bounds);
|
||||||
|
|
||||||
if (mainview) // Bind the scene frame buffer and turn on draw buffers used by ssao
|
if (mainview) // Bind the scene frame buffer and turn on draw buffers used by ssao
|
||||||
{
|
{
|
||||||
|
@ -400,20 +400,20 @@ void PolyFrameBuffer::DrawScene(HWDrawInfo *di, int drawmode)
|
||||||
}
|
}
|
||||||
|
|
||||||
GetRenderState()->SetDepthMask(true);
|
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());
|
di->RenderScene(*GetRenderState());
|
||||||
|
|
||||||
if (applySSAO && GetRenderState()->GetPassType() == GBUFFER_PASS)
|
if (applySSAO && GetRenderState()->GetPassType() == GBUFFER_PASS)
|
||||||
{
|
{
|
||||||
//mPostprocess->AmbientOccludeScene(di->VPUniforms.mProjectionMatrix.get()[5]);
|
//mPostprocess->AmbientOccludeScene(di->VPUniforms.mProjectionMatrix.get()[5]);
|
||||||
//screen->mViewpoints->Bind(*GetRenderState(), di->vpIndex);
|
//mViewpoints->Bind(*GetRenderState(), di->vpIndex);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Handle all portals after rendering the opaque objects but before
|
// Handle all portals after rendering the opaque objects but before
|
||||||
// doing all translucent stuff
|
// doing all translucent stuff
|
||||||
recursion++;
|
recursion++;
|
||||||
screen->mPortalState->EndFrame(di, *GetRenderState());
|
mPortalState->EndFrame(di, *GetRenderState());
|
||||||
recursion--;
|
recursion--;
|
||||||
di->RenderTranslucent(*GetRenderState());
|
di->RenderTranslucent(*GetRenderState());
|
||||||
}
|
}
|
||||||
|
@ -511,11 +511,12 @@ void PolyFrameBuffer::UpdatePalette()
|
||||||
|
|
||||||
FTexture *PolyFrameBuffer::WipeStartScreen()
|
FTexture *PolyFrameBuffer::WipeStartScreen()
|
||||||
{
|
{
|
||||||
const auto &viewport = screen->mScreenViewport;
|
SetViewportRects(nullptr);
|
||||||
auto tex = new FWrapperTexture(viewport.width, viewport.height, 1);
|
|
||||||
|
auto tex = new FWrapperTexture(mScreenViewport.width, mScreenViewport.height, 1);
|
||||||
auto systex = static_cast<PolyHardwareTexture*>(tex->GetSystemTexture());
|
auto systex = static_cast<PolyHardwareTexture*>(tex->GetSystemTexture());
|
||||||
|
|
||||||
systex->CreateWipeTexture(viewport.width, viewport.height, "WipeStartScreen");
|
systex->CreateWipeTexture(mScreenViewport.width, mScreenViewport.height, "WipeStartScreen");
|
||||||
|
|
||||||
return tex;
|
return tex;
|
||||||
}
|
}
|
||||||
|
@ -525,11 +526,10 @@ FTexture *PolyFrameBuffer::WipeEndScreen()
|
||||||
Draw2D();
|
Draw2D();
|
||||||
Clear2D();
|
Clear2D();
|
||||||
|
|
||||||
const auto &viewport = screen->mScreenViewport;
|
auto tex = new FWrapperTexture(mScreenViewport.width, mScreenViewport.height, 1);
|
||||||
auto tex = new FWrapperTexture(viewport.width, viewport.height, 1);
|
|
||||||
auto systex = static_cast<PolyHardwareTexture*>(tex->GetSystemTexture());
|
auto systex = static_cast<PolyHardwareTexture*>(tex->GetSystemTexture());
|
||||||
|
|
||||||
systex->CreateWipeTexture(viewport.width, viewport.height, "WipeEndScreen");
|
systex->CreateWipeTexture(mScreenViewport.width, mScreenViewport.height, "WipeEndScreen");
|
||||||
|
|
||||||
return tex;
|
return tex;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue