mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-24 21:11:52 +00:00
- partial cleanup of Framebuffer interface
This commit is contained in:
parent
c3300ad88e
commit
49a395f561
7 changed files with 14 additions and 16 deletions
|
@ -519,7 +519,6 @@ static SystemBaseFrameBuffer* frameBuffer;
|
|||
|
||||
|
||||
SystemBaseFrameBuffer::SystemBaseFrameBuffer(void*, const bool fullscreen)
|
||||
: DFrameBuffer(vid_defwidth, vid_defheight)
|
||||
, m_fullscreen(false)
|
||||
, m_hiDPI(false)
|
||||
, m_window(nullptr)
|
||||
|
|
|
@ -492,7 +492,6 @@ IVideo *gl_CreateVideo()
|
|||
// FrameBuffer Implementation -----------------------------------------------
|
||||
|
||||
SystemBaseFrameBuffer::SystemBaseFrameBuffer(void *, bool fullscreen)
|
||||
: DFrameBuffer (vid_defwidth, vid_defheight)
|
||||
{
|
||||
if (Priv::window != nullptr)
|
||||
{
|
||||
|
|
|
@ -70,9 +70,8 @@ EXTERN_CVAR(Int, screenblocks)
|
|||
//
|
||||
//==========================================================================
|
||||
|
||||
DFrameBuffer::DFrameBuffer (int width, int height)
|
||||
DFrameBuffer::DFrameBuffer()
|
||||
{
|
||||
SetSize(width, height);
|
||||
}
|
||||
|
||||
DFrameBuffer::~DFrameBuffer()
|
||||
|
|
|
@ -147,7 +147,6 @@ class DDummyFrameBuffer : public DFrameBuffer
|
|||
typedef DFrameBuffer Super;
|
||||
public:
|
||||
DDummyFrameBuffer(int width, int height)
|
||||
: DFrameBuffer (0, 0)
|
||||
{
|
||||
SetVirtualSize(width, height);
|
||||
}
|
||||
|
@ -372,9 +371,9 @@ void V_InitScreenSize ()
|
|||
vid_defheight = height;
|
||||
}
|
||||
|
||||
void V_InitScreen()
|
||||
void V_InitScreen(int width, int height)
|
||||
{
|
||||
screen = new DDummyFrameBuffer (vid_defwidth, vid_defheight);
|
||||
screen = new DDummyFrameBuffer(width, height);
|
||||
}
|
||||
|
||||
void V_Init2()
|
||||
|
|
|
@ -156,7 +156,7 @@ public:
|
|||
double scaleFactor = 1.;
|
||||
|
||||
public:
|
||||
DFrameBuffer (int width=1, int height=1);
|
||||
DFrameBuffer();
|
||||
virtual ~DFrameBuffer();
|
||||
virtual void InitializeState() = 0; // For stuff that needs 'screen' set.
|
||||
virtual bool IsVulkan() { return false; }
|
||||
|
@ -303,7 +303,7 @@ EXTERN_CVAR (Float, vid_gamma)
|
|||
|
||||
// Allocates buffer screens, call before R_Init.
|
||||
void V_InitScreenSize();
|
||||
void V_InitScreen();
|
||||
void V_InitScreen(int, int);
|
||||
|
||||
// Initializes graphics mode for the first time.
|
||||
void V_Init2 ();
|
||||
|
|
|
@ -195,6 +195,8 @@ EXTERN_CVAR (Bool, sv_unlimited_pickup)
|
|||
EXTERN_CVAR (Bool, r_drawplayersprites)
|
||||
EXTERN_CVAR (Bool, show_messages)
|
||||
EXTERN_CVAR(Bool, ticker)
|
||||
EXTERN_CVAR(Int, vid_defwidth)
|
||||
EXTERN_CVAR(Int, vid_defheight)
|
||||
|
||||
extern bool setmodeneeded;
|
||||
extern bool demorecording;
|
||||
|
@ -3114,7 +3116,7 @@ static int D_InitGame(const FIWADInfo* iwad_info, TArray<FString>& allwads, TArr
|
|||
{
|
||||
V_InitScreenSize();
|
||||
// This allocates a dummy framebuffer as a stand-in until V_Init2 is called.
|
||||
V_InitScreen ();
|
||||
V_InitScreen (vid_defwidth, vid_defheight);
|
||||
|
||||
if (StartScreen != nullptr)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue