GLContext: Use host connection

This also removes the need for a sleeping event thread.
This commit is contained in:
Stenzek
2018-10-03 23:03:19 +10:00
parent 1d827a5223
commit 9c57a98723
18 changed files with 68 additions and 97 deletions

View File

@ -27,7 +27,7 @@ std::unique_ptr<GLContext> g_main_gl_context;
GLContext::~GLContext() = default;
bool GLContext::Initialize(void* window_handle, bool stereo, bool core)
bool GLContext::Initialize(void* display_handle, void* window_handle, bool stereo, bool core)
{
return false;
}
@ -37,12 +37,6 @@ bool GLContext::Initialize(GLContext* main_context)
return false;
}
void GLContext::SetBackBufferDimensions(u32 w, u32 h)
{
m_backbuffer_width = w;
m_backbuffer_height = h;
}
bool GLContext::IsHeadless() const
{
return true;
@ -88,7 +82,8 @@ void* GLContext::GetFuncAddress(const std::string& name)
return nullptr;
}
std::unique_ptr<GLContext> GLContext::Create(void* window_handle, bool stereo, bool core)
std::unique_ptr<GLContext> GLContext::Create(void* display_handle, void* window_handle, bool stereo,
bool core)
{
std::unique_ptr<GLContext> context;
#if defined(__APPLE__)
@ -108,7 +103,7 @@ std::unique_ptr<GLContext> GLContext::Create(void* window_handle, bool stereo, b
#else
return nullptr;
#endif
if (!context->Initialize(window_handle, stereo, core))
if (!context->Initialize(display_handle, window_handle, stereo, core))
return nullptr;
return context;