mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-24 21:21:04 +00:00
- use the proper level for setting up a hardware rendered scene.
The shader timer may be taken from the primary level for the entire scene, because it will always be the same for all levels in a set. The camera textures need to be prepared for all levels.
This commit is contained in:
parent
d941dea005
commit
0ef0698d24
1 changed files with 12 additions and 7 deletions
|
@ -253,13 +253,18 @@ sector_t *FGLRenderer::RenderView(player_t* player)
|
|||
// NoInterpolateView should have no bearing on camera textures, but needs to be preserved for the main view below.
|
||||
bool saved_niv = NoInterpolateView;
|
||||
NoInterpolateView = false;
|
||||
// prepare all camera textures that have been used in the last frame
|
||||
auto Level = r_viewpoint.ViewLevel;
|
||||
gl_RenderState.CheckTimer(Level->ShaderStartTime);
|
||||
Level->canvasTextureInfo.UpdateAll([&](AActor *camera, FCanvasTexture *camtex, double fov)
|
||||
|
||||
// Shader start time does not need to be handled per level. Just use the one from the camera to render from.
|
||||
gl_RenderState.CheckTimer(player->camera->Level->ShaderStartTime);
|
||||
// prepare all camera textures that have been used in the last frame.
|
||||
// This must be done for all levels, not just the primary one!
|
||||
for (auto Level : AllLevels())
|
||||
{
|
||||
RenderTextureView(camtex, camera, fov);
|
||||
});
|
||||
Level->canvasTextureInfo.UpdateAll([&](AActor *camera, FCanvasTexture *camtex, double fov)
|
||||
{
|
||||
RenderTextureView(camtex, camera, fov);
|
||||
});
|
||||
}
|
||||
NoInterpolateView = saved_niv;
|
||||
|
||||
|
||||
|
@ -391,4 +396,4 @@ void FGLRenderer::BeginFrame()
|
|||
mSaveBuffers->Setup(SAVEPICWIDTH, SAVEPICHEIGHT, SAVEPICWIDTH, SAVEPICHEIGHT);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue