Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorExMix <rahuba.youri@mapswithme.com>2014-03-27 18:55:45 +0400
committerAlex Zolotarev <alex@maps.me>2015-09-23 02:13:59 +0300
commit760e3679c35f407d8481503b4898744b850cae50 (patch)
tree65dd6f87eff3c429df5c0148f1489edc4d46f43a /drape/texture.hpp
parent9eaf13fa8efdf6a071dbdd22c981c5adcc404db6 (diff)
[drape] texture wrapper and texture manager
Diffstat (limited to 'drape/texture.hpp')
-rw-r--r--drape/texture.hpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/drape/texture.hpp b/drape/texture.hpp
index 18f74366dd..2c74bffa23 100644
--- a/drape/texture.hpp
+++ b/drape/texture.hpp
@@ -3,6 +3,8 @@
#include "pointers.hpp"
#include "glconstants.hpp"
+#include "../geometry/rect2d.hpp"
+
#include "../std/stdint.hpp"
class Texture
@@ -14,7 +16,21 @@ public:
RGBA4
};
+ class Key
+ {
+ public:
+ enum Type
+ {
+ Symbol,
+ Font,
+ UniformValue
+ };
+
+ virtual Type GetType() const = 0;
+ };
+
Texture();
+ virtual ~Texture();
void Create(uint32_t width, uint32_t height, TextureFormat format);
void Create(uint32_t width, uint32_t height, TextureFormat format, RefPointer<void> data);
@@ -24,6 +40,8 @@ public:
void UploadData(uint32_t x, uint32_t y, uint32_t width, uint32_t height, TextureFormat format,
RefPointer<void> data);
+ virtual bool FindResource(Key const & key, m2::RectF & texRect, m2::PointU & pixelSize) const = 0;
+
uint32_t GetWidth() const;
uint32_t GetHeight() const;
float GetS(uint32_t x) const;