Working HECL shader generation on D3D11/12

This commit is contained in:
Jack Andersen
2015-11-17 20:14:49 -10:00
parent 742e062cf2
commit 998255efd5
12 changed files with 229 additions and 88 deletions

View File

@@ -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()
{