@@ -244015,7 +244015,12 @@ public: | |||||
void deleteContext() | void deleteContext() | ||||
{ | { | ||||
makeInactive(); | makeInactive(); | ||||
wglDeleteContext (renderContext); | |||||
if (renderContext != 0) | |||||
{ | |||||
wglDeleteContext (renderContext); | |||||
renderContext = 0; | |||||
} | |||||
} | } | ||||
bool makeActive() const throw() | bool makeActive() const throw() | ||||
@@ -259143,8 +259148,12 @@ public: | |||||
{ | { | ||||
makeInactive(); | makeInactive(); | ||||
ScopedXLock xlock; | |||||
glXDestroyContext (display, renderContext); | |||||
if (renderContext != 0) | |||||
{ | |||||
ScopedXLock xlock; | |||||
glXDestroyContext (display, renderContext); | |||||
renderContext = 0; | |||||
} | |||||
} | } | ||||
bool makeActive() const throw() | bool makeActive() const throw() | ||||
@@ -266828,6 +266837,9 @@ public: | |||||
{ | { | ||||
makeInactive(); | makeInactive(); | ||||
[renderContext clearDrawable]; | [renderContext clearDrawable]; | ||||
[renderContext setView: nil]; | |||||
[view setOpenGLContext: nil]; | |||||
renderContext = nil; | |||||
} | } | ||||
bool makeActive() const throw() | bool makeActive() const throw() | ||||
@@ -272417,6 +272429,9 @@ public: | |||||
{ | { | ||||
makeInactive(); | makeInactive(); | ||||
[renderContext clearDrawable]; | [renderContext clearDrawable]; | ||||
[renderContext setView: nil]; | |||||
[view setOpenGLContext: nil]; | |||||
renderContext = nil; | |||||
} | } | ||||
bool makeActive() const throw() | bool makeActive() const throw() | ||||
@@ -56878,6 +56878,10 @@ public: | |||||
virtual void* getRawContext() const throw() = 0; | virtual void* getRawContext() const throw() = 0; | ||||
/** Deletes the context. | /** Deletes the context. | ||||
This must only be called on the message thread, or will deadlock. | |||||
On background threads, call getCurrentContext()->deleteContext(), but be careful not | |||||
to call any other OpenGL function afterwards. | |||||
This doesn't touch other resources, such as window handles, etc. | This doesn't touch other resources, such as window handles, etc. | ||||
You'll probably never have to call this method directly. | You'll probably never have to call this method directly. | ||||
*/ | */ | ||||
@@ -147,6 +147,10 @@ public: | |||||
virtual void* getRawContext() const throw() = 0; | virtual void* getRawContext() const throw() = 0; | ||||
/** Deletes the context. | /** Deletes the context. | ||||
This must only be called on the message thread, or will deadlock. | |||||
On background threads, call getCurrentContext()->deleteContext(), but be careful not | |||||
to call any other OpenGL function afterwards. | |||||
This doesn't touch other resources, such as window handles, etc. | This doesn't touch other resources, such as window handles, etc. | ||||
You'll probably never have to call this method directly. | You'll probably never have to call this method directly. | ||||
*/ | */ | ||||
@@ -3244,8 +3244,12 @@ public: | |||||
{ | { | ||||
makeInactive(); | makeInactive(); | ||||
ScopedXLock xlock; | |||||
glXDestroyContext (display, renderContext); | |||||
if (renderContext != 0) | |||||
{ | |||||
ScopedXLock xlock; | |||||
glXDestroyContext (display, renderContext); | |||||
renderContext = 0; | |||||
} | |||||
} | } | ||||
bool makeActive() const throw() | bool makeActive() const throw() | ||||
@@ -184,6 +184,9 @@ public: | |||||
{ | { | ||||
makeInactive(); | makeInactive(); | ||||
[renderContext clearDrawable]; | [renderContext clearDrawable]; | ||||
[renderContext setView: nil]; | |||||
[view setOpenGLContext: nil]; | |||||
renderContext = nil; | |||||
} | } | ||||
bool makeActive() const throw() | bool makeActive() const throw() | ||||
@@ -123,7 +123,12 @@ public: | |||||
void deleteContext() | void deleteContext() | ||||
{ | { | ||||
makeInactive(); | makeInactive(); | ||||
wglDeleteContext (renderContext); | |||||
if (renderContext != 0) | |||||
{ | |||||
wglDeleteContext (renderContext); | |||||
renderContext = 0; | |||||
} | |||||
} | } | ||||
bool makeActive() const throw() | bool makeActive() const throw() | ||||