2013-06-23 07:49:34 +00:00
|
|
|
#ifndef __WIN32GLIFACE_H__
|
|
|
|
#define __WIN32GLIFACE_H__
|
|
|
|
|
|
|
|
#include "hardware.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_adapter);
|
|
|
|
|
|
|
|
extern IVideo *Video;
|
|
|
|
|
|
|
|
struct FRenderer;
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-03-30 22:25:15 +00:00
|
|
|
class Win32GLFrameBuffer : public DFrameBuffer
|
2013-06-23 07:49:34 +00:00
|
|
|
{
|
2018-03-30 22:25:15 +00:00
|
|
|
typedef DFrameBuffer Super;
|
2013-06-23 07:49:34 +00:00
|
|
|
|
|
|
|
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.
|
2016-10-11 13:43:12 +00:00
|
|
|
Win32GLFrameBuffer(void *hMonitor, int width, int height, int bits, int refreshHz, bool fullscreen, bool bgra);
|
2013-06-23 07:49:34 +00:00
|
|
|
virtual ~Win32GLFrameBuffer();
|
|
|
|
|
|
|
|
void SetVSync (bool vsync);
|
2013-08-18 12:16:33 +00:00
|
|
|
void SwapBuffers();
|
2013-06-23 07:49:34 +00:00
|
|
|
void NewRefreshRate ();
|
|
|
|
|
2016-07-26 19:27:02 +00:00
|
|
|
int GetClientWidth();
|
|
|
|
int GetClientHeight();
|
2013-06-23 07:49:34 +00:00
|
|
|
|
2017-03-09 12:09:38 +00:00
|
|
|
int GetTrueHeight();
|
2013-06-23 07:49:34 +00:00
|
|
|
|
|
|
|
|
|
|
|
bool IsFullscreen();
|
|
|
|
|
|
|
|
void InitializeState();
|
|
|
|
|
|
|
|
protected:
|
|
|
|
|
|
|
|
bool CanUpdate();
|
2016-07-26 19:27:02 +00:00
|
|
|
void ResetGammaTable();
|
2017-03-08 17:50:37 +00:00
|
|
|
void SetGammaTable(uint16_t * tbl);
|
2013-06-23 07:49:34 +00:00
|
|
|
|
|
|
|
float m_Gamma, m_Brightness, m_Contrast;
|
2017-03-09 12:16:01 +00:00
|
|
|
uint16_t m_origGamma[768];
|
|
|
|
bool m_supportsGamma;
|
2016-10-11 13:43:12 +00:00
|
|
|
bool m_Fullscreen, m_Bgra;
|
2013-06-23 07:49:34 +00:00
|
|
|
int m_Width, m_Height, m_Bits, m_RefreshHz;
|
2017-03-09 12:16:01 +00:00
|
|
|
char m_displayDeviceNameBuffer[32/*CCHDEVICENAME*/]; // do not use windows.h constants here!
|
2013-06-23 07:49:34 +00:00
|
|
|
char *m_displayDeviceName;
|
2016-09-25 23:38:25 +00:00
|
|
|
int SwapInterval;
|
2013-06-23 07:49:34 +00:00
|
|
|
|
|
|
|
friend class Win32GLVideo;
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif //__WIN32GLIFACE_H__
|