mirror of
https://github.com/AxioDL/boo.git
synced 2025-12-14 07:36:26 +00:00
Window resizing stability fixes
This commit is contained in:
@@ -185,6 +185,7 @@ struct GraphicsContextGLX : IGraphicsContext
|
||||
|
||||
IGraphicsCommandQueue* m_commandQueue = nullptr;
|
||||
IGraphicsDataFactory* m_dataFactory = nullptr;
|
||||
GLXContext m_mainCtx = 0;
|
||||
GLXContext m_loadCtx = 0;
|
||||
|
||||
std::thread m_vsyncThread;
|
||||
@@ -396,6 +397,21 @@ public:
|
||||
return m_dataFactory;
|
||||
}
|
||||
|
||||
IGraphicsDataFactory* getMainContextDataFactory()
|
||||
{
|
||||
XLockDisplay(m_xDisp);
|
||||
if (!m_mainCtx)
|
||||
{
|
||||
m_mainCtx = glXCreateContextAttribsARB(m_xDisp, m_fbconfig, m_glxCtx, True, ContextAttribs);
|
||||
if (!m_mainCtx)
|
||||
Log.report(LogVisor::FatalError, "unable to make main GLX context");
|
||||
}
|
||||
if (!glXMakeContextCurrent(m_xDisp, m_glxWindow, m_glxWindow, m_mainCtx))
|
||||
Log.report(LogVisor::FatalError, "unable to make main GLX context current");
|
||||
XUnlockDisplay(m_xDisp);
|
||||
return getDataFactory();
|
||||
}
|
||||
|
||||
IGraphicsDataFactory* getLoadContextDataFactory()
|
||||
{
|
||||
XLockDisplay(m_xDisp);
|
||||
@@ -1180,6 +1196,11 @@ public:
|
||||
return m_gfxCtx.getDataFactory();
|
||||
}
|
||||
|
||||
IGraphicsDataFactory* getMainContextDataFactory()
|
||||
{
|
||||
return m_gfxCtx.getMainContextDataFactory();
|
||||
}
|
||||
|
||||
IGraphicsDataFactory* getLoadContextDataFactory()
|
||||
{
|
||||
return m_gfxCtx.getLoadContextDataFactory();
|
||||
|
||||
Reference in New Issue
Block a user