- use locally stored viewpoint variables in the hardware renderer.
- move a few variables from SceneDrawer to FRenderViewpoint. The global r_viewpoint variable is left alone now to always represent the current viewpoint to the play code. The main reason behind this change is to reduce the amount of global variables being used by the hardware renderer's scene processing code.
This commit is contained in:
parent
d2309af3d5
commit
54970b60e8
26 changed files with 221 additions and 217 deletions
|
|
@ -89,7 +89,6 @@ FGLRenderer::FGLRenderer(OpenGLFrameBuffer *fb)
|
|||
mCurrentPortal = nullptr;
|
||||
mMirrorCount = 0;
|
||||
mPlaneMirrorCount = 0;
|
||||
mAngles = FRotator(0.f, 0.f, 0.f);
|
||||
mVBO = nullptr;
|
||||
mSkyVBO = nullptr;
|
||||
mShaderManager = nullptr;
|
||||
|
|
@ -326,7 +325,7 @@ sector_t *FGLRenderer::RenderView(player_t* player)
|
|||
GLSceneDrawer drawer;
|
||||
|
||||
mShadowMap.Update();
|
||||
retsec = drawer.RenderViewpoint(player->camera, NULL, r_viewpoint.FieldOfView.Degrees, ratio, fovratio, true, true);
|
||||
retsec = drawer.RenderViewpoint(r_viewpoint, player->camera, NULL, r_viewpoint.FieldOfView.Degrees, ratio, fovratio, true, true);
|
||||
}
|
||||
All.Unclock();
|
||||
return retsec;
|
||||
|
|
@ -354,7 +353,8 @@ void FGLRenderer::RenderTextureView(FCanvasTexture *tex, AActor *Viewpoint, doub
|
|||
bounds.height = FHardwareTexture::GetTexDimension(gltex->GetHeight());
|
||||
|
||||
GLSceneDrawer drawer;
|
||||
drawer.RenderViewpoint(Viewpoint, &bounds, FOV, (float)width / height, (float)width / height, false, false);
|
||||
FRenderViewpoint texvp;
|
||||
drawer.RenderViewpoint(texvp, Viewpoint, &bounds, FOV, (float)width / height, (float)width / height, false, false);
|
||||
|
||||
EndOffscreen();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue