Merge pull request #3649 from stenzek/wgl-core-shared

GLInterface: Implement core and shared context creation for WGL
This commit is contained in:
Stenzek
2016-11-29 22:59:31 +10:00
committed by GitHub
2 changed files with 409 additions and 65 deletions
File diff suppressed because it is too large Load Diff
+10
View File
@@ -14,6 +14,7 @@ public:
void Swap() override;
void* GetFuncAddress(const std::string& name) override;
bool Create(void* window_handle, bool core) override;
bool Create(cInterfaceBase* main_context) override;
bool MakeCurrent() override;
bool ClearCurrent() override;
void Shutdown() override;
@@ -21,6 +22,15 @@ public:
void Update() override;
bool PeekMessages() override;
std::unique_ptr<cInterfaceBase> CreateSharedContext() override;
private:
static HGLRC CreateCoreContext(HDC dc, HGLRC share_context);
static bool CreatePBuffer(HDC onscreen_dc, int width, int height, HANDLE* pbuffer_handle,
HDC* pbuffer_dc);
HWND m_window_handle = nullptr;
HANDLE m_pbuffer_handle = nullptr;
HDC m_dc = nullptr;
HGLRC m_rc = nullptr;
};