From 04916c1b451e4400a496ae210b3faa10154c65ac Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Wed, 21 Nov 2012 21:13:31 +0300 Subject: Add batch drawing for any images. Add this drawing to Button. --- src/graphicsvertexes.cpp | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) (limited to 'src/graphicsvertexes.cpp') 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(); +} -- cgit v1.2.3-70-g09d2