Commit 1970d0f3 authored by hybrid's avatar hybrid

Fixed context release for glx 1.3 amd higher.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@1525 dfc29bdd-3216-0410-991c-e03cc46cb475
parent 4dd11b32
......@@ -101,8 +101,16 @@ CIrrDeviceLinux::~CIrrDeviceLinux()
#ifdef _IRR_COMPILE_WITH_OPENGL_
if (Context)
{
if (!glXMakeCurrent(display, None, NULL))
os::Printer::log("Could not release glx context.", ELL_WARNING);
if (glxWin)
{
if (!glXMakeContextCurrent(display, None, None, NULL))
os::Printer::log("Could not release glx context.", ELL_WARNING);
}
else
{
if (!glXMakeCurrent(display, None, NULL))
os::Printer::log("Could not release glx context.", ELL_WARNING);
}
glXDestroyContext(display, Context);
if (UseGLXWindow)
glXDestroyWindow(display, glxWin);
......@@ -265,7 +273,6 @@ bool CIrrDeviceLinux::createWindow()
#ifdef _IRR_COMPILE_WITH_OPENGL_
Context=0;
GLXFBConfig glxFBConfig;
int major, minor;
bool isAvailableGLX=false;
......@@ -541,6 +548,7 @@ bool CIrrDeviceLinux::createWindow()
#ifdef _IRR_COMPILE_WITH_OPENGL_
// connect glx context to window
Context=0;
if (isAvailableGLX && CreationParams.DriverType==video::EDT_OPENGL)
{
if (UseGLXWindow)
......
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