mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-30 07:41:22 +00:00
- fixed: The clipper for the main scene may not be initialized before the camera textures have been drawn.
It looks like the memory management at use here is not capable of maintaining multiple instances simultaneously and the camera textures create another scene drawer so the initialization of the main scene drawer has to be delayed until after the camera textures are done.
This commit is contained in:
parent
3f7160183d
commit
7d8d69d01b
2 changed files with 12 additions and 11 deletions
|
@ -167,6 +167,8 @@ public:
|
||||||
unsigned char *GetTextureBuffer(FTexture *tex, int &w, int &h);
|
unsigned char *GetTextureBuffer(FTexture *tex, int &w, int &h);
|
||||||
void SetupLevel();
|
void SetupLevel();
|
||||||
|
|
||||||
|
void RenderView(player_t* player);
|
||||||
|
|
||||||
void RenderScreenQuad();
|
void RenderScreenQuad();
|
||||||
void PostProcessScene(int fixedcm);
|
void PostProcessScene(int fixedcm);
|
||||||
void AmbientOccludeScene();
|
void AmbientOccludeScene();
|
||||||
|
|
|
@ -871,13 +871,12 @@ sector_t * GLSceneDrawer::RenderViewpoint (AActor * camera, GL_IRECT * bounds, f
|
||||||
//
|
//
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
|
||||||
void GLSceneDrawer::RenderView (player_t* player)
|
void FGLRenderer::RenderView (player_t* player)
|
||||||
{
|
{
|
||||||
|
|
||||||
checkBenchActive();
|
checkBenchActive();
|
||||||
|
|
||||||
gl_RenderState.SetVertexBuffer(GLRenderer->mVBO);
|
gl_RenderState.SetVertexBuffer(mVBO);
|
||||||
GLRenderer->mVBO->Reset();
|
mVBO->Reset();
|
||||||
|
|
||||||
// reset statistics counters
|
// reset statistics counters
|
||||||
ResetProfilingData();
|
ResetProfilingData();
|
||||||
|
@ -889,7 +888,7 @@ void GLSceneDrawer::RenderView (player_t* player)
|
||||||
|
|
||||||
P_FindParticleSubsectors ();
|
P_FindParticleSubsectors ();
|
||||||
|
|
||||||
if (!gl.legacyMode) GLRenderer->mLights->Clear();
|
if (!gl.legacyMode) mLights->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;
|
||||||
|
@ -910,15 +909,16 @@ void GLSceneDrawer::RenderView (player_t* player)
|
||||||
{
|
{
|
||||||
fovratio = ratio;
|
fovratio = ratio;
|
||||||
}
|
}
|
||||||
|
GLSceneDrawer drawer;
|
||||||
|
|
||||||
SetFixedColormap (player);
|
drawer.SetFixedColormap (player);
|
||||||
|
|
||||||
// Check if there's some lights. If not some code can be skipped.
|
// Check if there's some lights. If not some code can be skipped.
|
||||||
TThinkerIterator<ADynamicLight> it(STAT_DLIGHT);
|
TThinkerIterator<ADynamicLight> it(STAT_DLIGHT);
|
||||||
GLRenderer->mLightCount = ((it.Next()) != NULL);
|
mLightCount = ((it.Next()) != NULL);
|
||||||
|
|
||||||
GLRenderer->mShadowMap.Update();
|
mShadowMap.Update();
|
||||||
sector_t * viewsector = RenderViewpoint(player->camera, NULL, r_viewpoint.FieldOfView.Degrees, ratio, fovratio, true, true);
|
sector_t * viewsector = drawer.RenderViewpoint(player->camera, NULL, r_viewpoint.FieldOfView.Degrees, ratio, fovratio, true, true);
|
||||||
|
|
||||||
All.Unclock();
|
All.Unclock();
|
||||||
}
|
}
|
||||||
|
@ -1068,8 +1068,7 @@ void FGLInterface::WriteSavePic (player_t *player, FileWriter *file, int width,
|
||||||
|
|
||||||
void FGLInterface::RenderView(player_t *player)
|
void FGLInterface::RenderView(player_t *player)
|
||||||
{
|
{
|
||||||
GLSceneDrawer drawer;
|
GLRenderer->RenderView(player);
|
||||||
drawer.RenderView(player);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//===========================================================================
|
//===========================================================================
|
||||||
|
|
Loading…
Reference in a new issue