mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-13 16:07:40 +00:00
- fixed: r_showviewer must always be true when rendering a mirror portal.
This commit is contained in:
parent
bb4bd76257
commit
213d7a75c2
2 changed files with 8 additions and 0 deletions
|
@ -83,6 +83,8 @@ EXTERN_CVAR(Bool, gl_portals)
|
||||||
EXTERN_CVAR(Bool, gl_noquery)
|
EXTERN_CVAR(Bool, gl_noquery)
|
||||||
EXTERN_CVAR(Int, r_mirror_recursions)
|
EXTERN_CVAR(Int, r_mirror_recursions)
|
||||||
|
|
||||||
|
extern bool r_showviewer;
|
||||||
|
|
||||||
TArray<GLPortal *> GLPortal::portals;
|
TArray<GLPortal *> GLPortal::portals;
|
||||||
TArray<float> GLPortal::planestack;
|
TArray<float> GLPortal::planestack;
|
||||||
int GLPortal::recursion;
|
int GLPortal::recursion;
|
||||||
|
@ -311,6 +313,7 @@ bool GLPortal::Start(bool usestencil, bool doquery)
|
||||||
savedviewactor=GLRenderer->mViewActor;
|
savedviewactor=GLRenderer->mViewActor;
|
||||||
savedviewangle=viewangle;
|
savedviewangle=viewangle;
|
||||||
savedviewarea=in_area;
|
savedviewarea=in_area;
|
||||||
|
savedshowviewer = r_showviewer;
|
||||||
|
|
||||||
NextPortal = GLRenderer->mCurrentPortal;
|
NextPortal = GLRenderer->mCurrentPortal;
|
||||||
GLRenderer->mCurrentPortal = NULL; // Portals which need this have to set it themselves
|
GLRenderer->mCurrentPortal = NULL; // Portals which need this have to set it themselves
|
||||||
|
@ -382,6 +385,7 @@ void GLPortal::End(bool usestencil)
|
||||||
viewangle=savedviewangle;
|
viewangle=savedviewangle;
|
||||||
GLRenderer->mViewActor=savedviewactor;
|
GLRenderer->mViewActor=savedviewactor;
|
||||||
in_area=savedviewarea;
|
in_area=savedviewarea;
|
||||||
|
r_showviewer = savedshowviewer;
|
||||||
GLRenderer->SetupView(viewx, viewy, viewz, viewangle, !!(MirrorFlag & 1), !!(PlaneMirrorFlag & 1));
|
GLRenderer->SetupView(viewx, viewy, viewz, viewangle, !!(MirrorFlag & 1), !!(PlaneMirrorFlag & 1));
|
||||||
|
|
||||||
{
|
{
|
||||||
|
@ -440,6 +444,7 @@ void GLPortal::End(bool usestencil)
|
||||||
viewangle=savedviewangle;
|
viewangle=savedviewangle;
|
||||||
GLRenderer->mViewActor=savedviewactor;
|
GLRenderer->mViewActor=savedviewactor;
|
||||||
in_area=savedviewarea;
|
in_area=savedviewarea;
|
||||||
|
r_showviewer = savedshowviewer;
|
||||||
GLRenderer->SetupView(viewx, viewy, viewz, viewangle, !!(MirrorFlag&1), !!(PlaneMirrorFlag&1));
|
GLRenderer->SetupView(viewx, viewy, viewz, viewangle, !!(MirrorFlag&1), !!(PlaneMirrorFlag&1));
|
||||||
|
|
||||||
// This draws a valid z-buffer into the stencil's contents to ensure it
|
// This draws a valid z-buffer into the stencil's contents to ensure it
|
||||||
|
@ -806,6 +811,7 @@ void GLPlaneMirrorPortal::DrawContents()
|
||||||
viewz = 2*planez - viewz;
|
viewz = 2*planez - viewz;
|
||||||
GLRenderer->mViewActor = NULL;
|
GLRenderer->mViewActor = NULL;
|
||||||
PlaneMirrorMode = ksgn(origin->c);
|
PlaneMirrorMode = ksgn(origin->c);
|
||||||
|
r_showviewer = true;
|
||||||
|
|
||||||
validcount++;
|
validcount++;
|
||||||
|
|
||||||
|
@ -922,6 +928,7 @@ void GLMirrorPortal::DrawContents()
|
||||||
linedef->v2->x, linedef->v2->y) - startang;
|
linedef->v2->x, linedef->v2->y) - startang;
|
||||||
|
|
||||||
GLRenderer->mViewActor = NULL;
|
GLRenderer->mViewActor = NULL;
|
||||||
|
r_showviewer = true;
|
||||||
|
|
||||||
validcount++;
|
validcount++;
|
||||||
|
|
||||||
|
|
|
@ -117,6 +117,7 @@ private:
|
||||||
angle_t savedviewangle;
|
angle_t savedviewangle;
|
||||||
AActor * savedviewactor;
|
AActor * savedviewactor;
|
||||||
area_t savedviewarea;
|
area_t savedviewarea;
|
||||||
|
bool savedshowviewer;
|
||||||
GLPortal *NextPortal;
|
GLPortal *NextPortal;
|
||||||
TArray<BYTE> savedmapsection;
|
TArray<BYTE> savedmapsection;
|
||||||
TArray<unsigned int> mPrimIndices;
|
TArray<unsigned int> mPrimIndices;
|
||||||
|
|
Loading…
Reference in a new issue