- made camera textures operational again.

Now with proper separation of software rendering logic from the main part of the class.
This commit is contained in:
Christoph Oelckers 2018-12-11 00:01:45 +01:00
commit 5666e4c805
27 changed files with 518 additions and 459 deletions

View file

@ -254,7 +254,10 @@ sector_t *FGLRenderer::RenderView(player_t* player)
bool saved_niv = NoInterpolateView;
NoInterpolateView = false;
// prepare all camera textures that have been used in the last frame
FCanvasTextureInfo::UpdateAll();
level.canvasTextureInfo.UpdateAll([&](AActor *camera, FCanvasTexture *camtex, double fov)
{
RenderTextureView(camtex, camera, fov);
});
NoInterpolateView = saved_niv;
@ -324,7 +327,8 @@ void FGLRenderer::RenderTextureView(FCanvasTexture *tex, AActor *Viewpoint, doub
EndOffscreen();
tex->SetUpdated();
tex->SetUpdated(true);
static_cast<OpenGLFrameBuffer*>(screen)->camtexcount++;
}
//===========================================================================