Commit b316f61d authored by cutealien's avatar cutealien

Properly destroy OpenGL resources on linux (thx @curaga for the patch with id 3539332)


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@4257 dfc29bdd-3216-0410-991c-e03cc46cb475
parent b64028c1
Changes in 1.8 (??.??.2011) Changes in 1.8 (??.??.2011)
- Properly destroy OpenGL resources on linux (thx @curaga for the patch)
- Fix diplay bux in the attribute-panel of the GUIEditor. Fixes bug 3517314 (thx @Darkcoder for reporting). - Fix diplay bux in the attribute-panel of the GUIEditor. Fixes bug 3517314 (thx @Darkcoder for reporting).
- Allow caching cursor position on X11 to work around slow XQueryPointer calls (thx @Hendu for reporting+patch proposal) - Allow caching cursor position on X11 to work around slow XQueryPointer calls (thx @Hendu for reporting+patch proposal)
......
...@@ -11,6 +11,8 @@ ...@@ -11,6 +11,8 @@
#include <sys/utsname.h> #include <sys/utsname.h>
#include <time.h> #include <time.h>
#include "IEventReceiver.h" #include "IEventReceiver.h"
#include "ISceneManager.h"
#include "IGUIEnvironment.h"
#include "os.h" #include "os.h"
#include "CTimer.h" #include "CTimer.h"
#include "irrString.h" #include "irrString.h"
...@@ -140,6 +142,24 @@ CIrrDeviceLinux::~CIrrDeviceLinux() ...@@ -140,6 +142,24 @@ CIrrDeviceLinux::~CIrrDeviceLinux()
CursorControl->setVisible(false); CursorControl->setVisible(false);
static_cast<CCursorControl*>(CursorControl)->clearCursors(); static_cast<CCursorControl*>(CursorControl)->clearCursors();
} }
// Must free OpenGL textures etc before destroying context, so can't wait for stub destructor
if ( GUIEnvironment )
{
GUIEnvironment->drop();
GUIEnvironment = NULL;
}
if ( SceneManager )
{
SceneManager->drop();
SceneManager = NULL;
}
if ( VideoDriver )
{
VideoDriver->drop();
VideoDriver = NULL;
}
if (display) if (display)
{ {
#ifdef _IRR_COMPILE_WITH_OPENGL_ #ifdef _IRR_COMPILE_WITH_OPENGL_
......
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