mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-12-17 07:41:40 +00:00
62 lines
1.7 KiB
C++
62 lines
1.7 KiB
C++
//
|
|
// Copyright (C) 1993-1996 by id Software, Inc.
|
|
//
|
|
// This source is available for distribution and/or modification
|
|
// only under the terms of the DOOM Source Code License as
|
|
// published by id Software. All rights reserved.
|
|
//
|
|
// The source is distributed in the hope that it will be useful,
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
// FITNESS FOR A PARTICULAR PURPOSE. See the DOOM Source Code License
|
|
// for more details.
|
|
//
|
|
|
|
#pragma once
|
|
|
|
#include "swrenderer/segments/r_portalsegment.h"
|
|
|
|
namespace swrenderer
|
|
{
|
|
struct visplane_t;
|
|
|
|
class RenderPortal
|
|
{
|
|
public:
|
|
static RenderPortal *Instance();
|
|
|
|
void SetMainPortal();
|
|
void CopyStackedViewParameters();
|
|
|
|
void RenderPlanePortals();
|
|
void RenderLinePortals();
|
|
|
|
int WindowLeft = 0;
|
|
int WindowRight = 0;
|
|
uint16_t MirrorFlags = 0;
|
|
|
|
PortalDrawseg* CurrentPortal = nullptr;
|
|
int CurrentPortalUniq = 0;
|
|
bool CurrentPortalInSkybox = false;
|
|
|
|
// These are copies of the main parameters used when drawing stacked sectors.
|
|
// When you change the main parameters, you should copy them here too *unless*
|
|
// you are changing them to draw a stacked sector. Otherwise, stacked sectors
|
|
// won't draw in skyboxes properly.
|
|
int stacked_extralight = 0;
|
|
double stacked_visibility = 0.0;
|
|
DVector3 stacked_viewpos;
|
|
DAngle stacked_angle;
|
|
|
|
int numskyboxes = 0; // For ADD_STAT(skyboxes)
|
|
|
|
private:
|
|
void RenderLinePortal(PortalDrawseg* pds, int depth);
|
|
void RenderLinePortalHighlight(PortalDrawseg* pds);
|
|
|
|
TArray<size_t> interestingStack;
|
|
TArray<ptrdiff_t> drawsegStack;
|
|
TArray<ptrdiff_t> visspriteStack;
|
|
TArray<DVector3> viewposStack;
|
|
TArray<visplane_t *> visplaneStack;
|
|
};
|
|
}
|