gzdoom-gles/src/win32/win32gliface.h
Christoph Oelckers dc5a5419fc - took DCanvas and all its subtypes out of the DObject tree.
I have no idea why they were even in there, as they intentionally circumvented all GC related features - they declared themselves fixed if prone to getting collected, they all used OF_YesReallyDelete when destroying themselves and they never used any of the object creation or RTTI features, aside from a single assert in V_Init2.

Essentially they were a drag on the system and OF_YesReallyDelete was effectively added just to deal with the canvases which were DObjects but not supposed to behave like them in the first place.
2017-04-14 10:48:18 +02:00

89 lines
1.8 KiB
C++

#ifndef __WIN32GLIFACE_H__
#define __WIN32GLIFACE_H__
#include "hardware.h"
#include "win32iface.h"
#include "v_video.h"
#include "tarray.h"
extern IVideo *Video;
EXTERN_CVAR (Float, dimamount)
EXTERN_CVAR (Color, dimcolor)
EXTERN_CVAR(Int, vid_defwidth);
EXTERN_CVAR(Int, vid_defheight);
EXTERN_CVAR(Int, vid_renderer);
EXTERN_CVAR(Int, vid_adapter);
extern IVideo *Video;
struct FRenderer;
FRenderer *gl_CreateInterface();
class Win32GLFrameBuffer : public BaseWinFB
{
typedef BaseWinFB Super;
public:
Win32GLFrameBuffer() {}
// Actually, hMonitor is a HMONITOR, but it's passed as a void * as there
// look to be some cross-platform bits in the way.
Win32GLFrameBuffer(void *hMonitor, int width, int height, int bits, int refreshHz, bool fullscreen, bool bgra);
virtual ~Win32GLFrameBuffer();
// unused but must be defined
virtual void Blank ();
virtual bool PaintToWindow ();
virtual long/*HRESULT*/ GetHR(); // windows.h pollution prevention.
virtual bool CreateResources ();
virtual void ReleaseResources ();
void SetVSync (bool vsync);
void SwapBuffers();
void NewRefreshRate ();
int GetClientWidth();
int GetClientHeight();
int GetTrueHeight();
bool Lock(bool buffered);
bool Lock ();
void Unlock();
bool IsLocked ();
bool IsFullscreen();
void PaletteChanged();
int QueryNewPalette();
void InitializeState();
protected:
bool CanUpdate();
void ResetGammaTable();
void SetGammaTable(uint16_t * tbl);
float m_Gamma, m_Brightness, m_Contrast;
uint16_t m_origGamma[768];
bool m_supportsGamma;
bool m_Fullscreen, m_Bgra;
int m_Width, m_Height, m_Bits, m_RefreshHz;
int m_Lock;
char m_displayDeviceNameBuffer[32/*CCHDEVICENAME*/]; // do not use windows.h constants here!
char *m_displayDeviceName;
int SwapInterval;
friend class Win32GLVideo;
};
#endif //__WIN32GLIFACE_H__