summaryrefslogtreecommitdiff
path: root/src/graphicsvertexes.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2011-07-17 21:08:56 +0300
committerAndrei Karas <akaras@inbox.ru>2011-07-17 22:31:22 +0300
commit932a7f3ca748f04448c72c5d31515bc3a8008144 (patch)
treecc8f8af7da04d8c1c724dde76c7f6e895293871f /src/graphicsvertexes.cpp
parent3293fb7b5df3c93b7b6cccf56feb4fa42fd1ea41 (diff)
downloadManaVerse-932a7f3ca748f04448c72c5d31515bc3a8008144.tar.gz
ManaVerse-932a7f3ca748f04448c72c5d31515bc3a8008144.tar.bz2
ManaVerse-932a7f3ca748f04448c72c5d31515bc3a8008144.tar.xz
ManaVerse-932a7f3ca748f04448c72c5d31515bc3a8008144.zip
Optimisation in drawing map in opengl mode.
Diffstat (limited to 'src/graphicsvertexes.cpp')
-rw-r--r--src/graphicsvertexes.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/graphicsvertexes.cpp b/src/graphicsvertexes.cpp
index 7a3077ce3..90a7bbf38 100644
--- a/src/graphicsvertexes.cpp
+++ b/src/graphicsvertexes.cpp
@@ -43,6 +43,7 @@ SDLGraphicsVertexes::~SDLGraphicsVertexes()
#ifdef USE_OPENGL
OpenGLGraphicsVertexes::OpenGLGraphicsVertexes() :
+ ptr(0),
mFloatTexArray(0),
mIntTexArray(0),
mIntVertArray(0)
@@ -82,6 +83,13 @@ void OpenGLGraphicsVertexes::clear()
mIntTexPool.clear();
mVp.clear();
+ if (ptr)
+ {
+ ptr = 0;
+ delete []mFloatTexArray;
+ delete []mIntTexArray;
+ delete []mIntVertArray;
+ }
}
void OpenGLGraphicsVertexes::init()