Commit 8fd6208f authored by Oleg.Korshul's avatar Oleg.Korshul Committed by Alexander Trofimov
parent e76c55ba
...@@ -26,7 +26,8 @@ public: ...@@ -26,7 +26,8 @@ public:
} }
}; };
#ifdef _USE_QT_SHARING_GL_ // TODO: убрать, как только проверить линукс!!!
#if 0
void CVideoMemory::Init() void CVideoMemory::Init()
{ {
CTemporaryCS oCS(&m_oCS); CTemporaryCS oCS(&m_oCS);
...@@ -72,9 +73,10 @@ void CVideoMemory::SetCurrentCtx() ...@@ -72,9 +73,10 @@ void CVideoMemory::SetCurrentCtx()
void CVideoMemory::UnSetCurrentCtx() void CVideoMemory::UnSetCurrentCtx()
{ {
} }
#endif #endif
// Native control // Native control
void CNativeCtrl::slot_threadRepaint() void CNativeCtrl::slot_threadRepaint()
{ {
...@@ -525,8 +527,8 @@ void COpenGLSceneCtrl::drawBackground(QPainter *painter, const QRectF &rect) ...@@ -525,8 +527,8 @@ void COpenGLSceneCtrl::drawBackground(QPainter *painter, const QRectF &rect)
NSCriticalSection::CRITICAL_SECTION* pCS_GL = pVRAM_Worker->m_oFrame.GetLocker(); NSCriticalSection::CRITICAL_SECTION* pCS_GL = pVRAM_Worker->m_oFrame.GetLocker();
pCS_GL->Enter(); //pCS_GL->Enter();
pVRAM_Worker->m_oFrame.SetCurrentCtx(); //pVRAM_Worker->m_oFrame.SetCurrentCtx();
DWORD dwTime1 = NSTimers::GetTickCount(); DWORD dwTime1 = NSTimers::GetTickCount();
...@@ -633,9 +635,9 @@ void COpenGLSceneCtrl::drawBackground(QPainter *painter, const QRectF &rect) ...@@ -633,9 +635,9 @@ void COpenGLSceneCtrl::drawBackground(QPainter *painter, const QRectF &rect)
glFlush(); glFlush();
pVRAM_Worker->m_oFrame.UnSetCurrentCtx(); //pVRAM_Worker->m_oFrame.UnSetCurrentCtx();
pCS_GL->Leave(); //pCS_GL->Leave();
RELEASEOBJECT(pCS); RELEASEOBJECT(pCS);
...@@ -655,4 +657,16 @@ void COpenGLSceneCtrl::OpenFile(const std::wstring& sFilePath) ...@@ -655,4 +657,16 @@ void COpenGLSceneCtrl::OpenFile(const std::wstring& sFilePath)
m_pWrapper->InternalCalculateFile(); m_pWrapper->InternalCalculateFile();
} }
void COpenGLSceneCtrl::LockGL()
{
if (m_pWrapper)
m_pWrapper->m_oDevicePainter.m_oFrameControls.m_oFrame.GetLocker()->Enter();
}
void COpenGLSceneCtrl::UnlockGL()
{
if (m_pWrapper)
m_pWrapper->m_oDevicePainter.m_oFrameControls.m_oFrame.GetLocker()->Leave();
}
#endif #endif
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment