From 760e3679c35f407d8481503b4898744b850cae50 Mon Sep 17 00:00:00 2001 From: ExMix Date: Thu, 27 Mar 2014 17:55:45 +0300 Subject: [drape] texture wrapper and texture manager --- drape/texture.hpp | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'drape/texture.hpp') 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 data); @@ -24,6 +40,8 @@ public: void UploadData(uint32_t x, uint32_t y, uint32_t width, uint32_t height, TextureFormat format, RefPointer 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; -- cgit v1.2.3