win32-clarify threading logic in ogl display method
This commit is contained in:
parent
5538270c1a
commit
f09aaa3205
|
@ -1433,8 +1433,11 @@ struct GLDISPLAY
|
|||
bool begin()
|
||||
{
|
||||
DWORD myThread = GetCurrentThreadId();
|
||||
//if(myThread != dwMainThread) //single threading differences not needed right now
|
||||
{
|
||||
|
||||
//always use another context for display logic
|
||||
//1. if this is a single threaded process (3d rendering and display in the main thread) then alternating contexts is benign
|
||||
//2. if this is a multi threaded process (3d rendernig and display in other threads) then the display needs some context
|
||||
|
||||
if(!init)
|
||||
{
|
||||
if(!initialize()) return false;
|
||||
|
@ -1443,10 +1446,6 @@ struct GLDISPLAY
|
|||
return true;
|
||||
}
|
||||
|
||||
//we can render no problem in this thread (i hope)
|
||||
return true;
|
||||
}
|
||||
|
||||
void showPage()
|
||||
{
|
||||
SwapBuffers(privateDC);
|
||||
|
|
Loading…
Reference in New Issue