- merged gzdoom-gles2 and fixed some issues with pipeline size validation.

This commit is contained in:
Christoph Oelckers 2021-08-03 18:46:45 +02:00
commit 441cd0796f
116 changed files with 12502 additions and 80 deletions

View file

@ -107,7 +107,7 @@ sector_t* RenderViewpoint(FRenderViewpoint& mainvp, AActor* camera, IntRect* bou
R_SetupFrame(mainvp, r_viewwindow, camera);
if (mainview && toscreen && !(camera->Level->flags3 & LEVEL3_NOSHADOWMAP) && gl_light_shadowmap && (screen->hwcaps & RFL_SHADER_STORAGE_BUFFER))
if (mainview && toscreen && !(camera->Level->flags3 & LEVEL3_NOSHADOWMAP) && gl_light_shadowmap && screen->mPipelineType == 0 && (screen->hwcaps & RFL_SHADER_STORAGE_BUFFER))
{
screen->SetAABBTree(camera->Level->aabbTree);
screen->mShadowMap.SetCollectLights([=] {
@ -151,6 +151,10 @@ sector_t* RenderViewpoint(FRenderViewpoint& mainvp, AActor* camera, IntRect* bou
di->SetViewArea();
auto cm = di->SetFullbrightFlags(mainview ? vp.camera->player : nullptr);
float flash = 1.f;
// Only used by the GLES2 renderer
RenderState.SetSpecialColormap(cm, flash);
di->Viewpoint.FieldOfView = fov; // Set the real FOV for the current scene (it's not necessarily the same as the global setting in r_viewpoint)
// Stereo mode specific perspective projection
@ -161,6 +165,9 @@ sector_t* RenderViewpoint(FRenderViewpoint& mainvp, AActor* camera, IntRect* bou
di->ProcessScene(toscreen);
// Reset colormap so 2D drawing isn't affected
RenderState.SetSpecialColormap(CM_DEFAULT, 1);
if (mainview)
{
PostProcess.Clock();
@ -262,8 +269,8 @@ void WriteSavePic(player_t* player, FileWriter* file, int width, int height)
screen->ImageTransitionScene(true);
hw_ClearFakeFlat();
RenderState.SetVertexBuffer(screen->mVertexData);
screen->mVertexData->Reset();
RenderState.SetVertexBuffer(screen->mVertexData);
screen->mLights->Clear();
screen->mViewpoints->Clear();