mirror of
https://github.com/AxioDL/boo.git
synced 2025-12-17 17:05:24 +00:00
Working HECL shader generation on D3D11/12
This commit is contained in:
@@ -171,6 +171,11 @@ public:
|
||||
return m_dataFactory;
|
||||
}
|
||||
|
||||
IGraphicsDataFactory* getMainContextDataFactory()
|
||||
{
|
||||
return m_dataFactory;
|
||||
}
|
||||
|
||||
IGraphicsDataFactory* getLoadContextDataFactory()
|
||||
{
|
||||
return m_dataFactory;
|
||||
@@ -331,6 +336,22 @@ public:
|
||||
return m_dataFactory;
|
||||
}
|
||||
|
||||
/* Creates a new context on current thread!! Call from client loading thread */
|
||||
HGLRC m_mainCtx = 0;
|
||||
IGraphicsDataFactory* getMainContextDataFactory()
|
||||
{
|
||||
OGLContext::Window& w = m_3dCtx.m_ctxOgl.m_windows[m_parentWindow];
|
||||
if (!m_mainCtx)
|
||||
{
|
||||
m_mainCtx = wglCreateContextAttribsARB(w.m_deviceContext, w.m_mainContext, ContextAttribs);
|
||||
if (!m_mainCtx)
|
||||
Log.report(LogVisor::FatalError, "unable to make main WGL context");
|
||||
}
|
||||
if (!wglMakeCurrent(w.m_deviceContext, m_mainCtx))
|
||||
Log.report(LogVisor::FatalError, "unable to make main WGL context current");
|
||||
return m_dataFactory;
|
||||
}
|
||||
|
||||
/* Creates a new context on current thread!! Call from client loading thread */
|
||||
HGLRC m_loadCtx = 0;
|
||||
IGraphicsDataFactory* getLoadContextDataFactory()
|
||||
@@ -595,6 +616,10 @@ public:
|
||||
HWNDEvent& e = *static_cast<HWNDEvent*>(ev);
|
||||
switch (e.uMsg)
|
||||
{
|
||||
case WM_CLOSE:
|
||||
if (m_callback)
|
||||
m_callback->destroyed();
|
||||
return;
|
||||
case WM_SIZE:
|
||||
{
|
||||
SWindowRect rect;
|
||||
@@ -811,6 +836,12 @@ public:
|
||||
return m_gfxCtx->getDataFactory();
|
||||
}
|
||||
|
||||
/* Creates a new context on current thread!! Call from main client thread */
|
||||
IGraphicsDataFactory* getMainContextDataFactory()
|
||||
{
|
||||
return m_gfxCtx->getMainContextDataFactory();
|
||||
}
|
||||
|
||||
/* Creates a new context on current thread!! Call from client loading thread */
|
||||
IGraphicsDataFactory* getLoadContextDataFactory()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user