- partial cleanup of Framebuffer interface

This commit is contained in:
Christoph Oelckers 2022-05-20 11:09:38 +02:00
parent c3300ad88e
commit 49a395f561
7 changed files with 14 additions and 16 deletions

View file

@ -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)

View file

@ -492,7 +492,6 @@ IVideo *gl_CreateVideo()
// FrameBuffer Implementation -----------------------------------------------
SystemBaseFrameBuffer::SystemBaseFrameBuffer(void *, bool fullscreen)
: DFrameBuffer (vid_defwidth, vid_defheight)
{
if (Priv::window != nullptr)
{

View file

@ -70,9 +70,8 @@ EXTERN_CVAR(Int, screenblocks)
//
//==========================================================================
DFrameBuffer::DFrameBuffer (int width, int height)
DFrameBuffer::DFrameBuffer()
{
SetSize(width, height);
}
DFrameBuffer::~DFrameBuffer()

View file

@ -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()

View file

@ -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 ();

View file

@ -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)
{