summaryrefslogtreecommitdiff
path: root/src/graphicsvertexes.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-11-21 21:13:31 +0300
committerAndrei Karas <akaras@inbox.ru>2012-12-01 22:58:18 +0300
commit04916c1b451e4400a496ae210b3faa10154c65ac (patch)
treefe7414434dcb6bcc1405b0d608d82348bc3ca466 /src/graphicsvertexes.cpp
parentd48e360ea40536e9f3e7fb4ce381b7fdc2ee5954 (diff)
downloadmanaplus-04916c1b451e4400a496ae210b3faa10154c65ac.tar.gz
manaplus-04916c1b451e4400a496ae210b3faa10154c65ac.tar.bz2
manaplus-04916c1b451e4400a496ae210b3faa10154c65ac.tar.xz
manaplus-04916c1b451e4400a496ae210b3faa10154c65ac.zip
Add batch drawing for any images.
Add this drawing to Button.
Diffstat (limited to 'src/graphicsvertexes.cpp')
-rw-r--r--src/graphicsvertexes.cpp27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/graphicsvertexes.cpp b/src/graphicsvertexes.cpp
index 3574ffe27..3ad522d79 100644
--- a/src/graphicsvertexes.cpp
+++ b/src/graphicsvertexes.cpp
@@ -286,3 +286,30 @@ ImageVertexes::~ImageVertexes()
delete_all(sdl);
sdl.clear();
}
+
+ImageCollection::ImageCollection() :
+#ifdef USE_OPENGL
+ currentGLImage(0),
+#endif
+ currentImage(nullptr),
+ currentVert(nullptr)
+{
+
+}
+
+ImageCollection::~ImageCollection()
+{
+ clear();
+}
+
+void ImageCollection::clear()
+{
+#ifdef USE_OPENGL
+ currentGLImage = 0;
+#endif
+ currentImage = nullptr;
+ currentVert = nullptr;
+
+ delete_all(draws);
+ draws.clear();
+}