2018-04-09 08:48:20 +00:00
|
|
|
#ifndef __WIN32_GL_SYSFB_H__
|
|
|
|
#define __WIN32_GL_SYSFB_H__
|
2013-06-23 07:49:34 +00:00
|
|
|
|
|
|
|
#include "v_video.h"
|
|
|
|
|
2018-04-09 08:48:20 +00:00
|
|
|
class SystemFrameBuffer : 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:
|
2018-04-09 08:48:20 +00:00
|
|
|
SystemFrameBuffer() {}
|
2013-06-23 07:49:34 +00:00
|
|
|
// Actually, hMonitor is a HMONITOR, but it's passed as a void * as there
|
|
|
|
// look to be some cross-platform bits in the way.
|
2018-04-09 08:48:20 +00:00
|
|
|
SystemFrameBuffer(void *hMonitor, int width, int height, int bits, int refreshHz, bool fullscreen, bool bgra);
|
|
|
|
virtual ~SystemFrameBuffer();
|
2013-06-23 07:49:34 +00:00
|
|
|
|
|
|
|
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;
|
|
|
|
|
|
|
|
};
|
|
|
|
|
2018-04-09 08:48:20 +00:00
|
|
|
#endif // __WIN32_GL_SYSFB_H__
|