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>2015-08-18 12:48:50 +0300
committerr.kuznetsov <r.kuznetsov@corp.mail.ru>2015-11-30 16:10:00 +0300
commitc1f9b0cf5868159ce49176bb7c9929c642e75aca (patch)
treed5530f3929160dd65ea386005a41c0789d20f3ec /drape/texture.hpp
parent2dff0c6bbe755f596a9930c415da6a1dbfe50b19 (diff)
[drape, ios] fast textures.
Diffstat (limited to 'drape/texture.hpp')
-rw-r--r--drape/texture.hpp27
1 files changed, 10 insertions, 17 deletions
diff --git a/drape/texture.hpp b/drape/texture.hpp
index 705bfcc96e..de60ec5add 100644
--- a/drape/texture.hpp
+++ b/drape/texture.hpp
@@ -3,6 +3,7 @@
#include "drape/pointers.hpp"
#include "drape/glconstants.hpp"
#include "drape/drape_global.hpp"
+#include "drape/hw_texture.hpp"
#include "geometry/rect2d.hpp"
@@ -47,19 +48,17 @@ public:
Texture();
virtual ~Texture();
- void Create(uint32_t width, uint32_t height, TextureFormat format);
- void Create(uint32_t width, uint32_t height, TextureFormat format, ref_ptr<void> data);
-
- void SetFilterParams(glConst minFilter, glConst magFilter);
- void SetWrapMode(glConst sMode, glConst tMode);
-
- void UploadData(uint32_t x, uint32_t y, uint32_t width, uint32_t height, TextureFormat format,
- ref_ptr<void> data);
-
virtual ref_ptr<ResourceInfo> FindResource(Key const & key, bool & newResource) = 0;
virtual void UpdateState() {}
virtual bool HasAsyncRoutines() const { return false; }
+ using Params = HWTexture::Params;
+
+ void Create(Params const & params);
+ void Create(Params const & params, ref_ptr<void> data);
+
+ void UploadData(uint32_t x, uint32_t y, uint32_t width, uint32_t height, ref_ptr<void> data);
+
TextureFormat GetFormat() const;
uint32_t GetWidth() const;
uint32_t GetHeight() const;
@@ -72,16 +71,10 @@ public:
protected:
void Destroy();
+ bool AllocateTexture(ref_ptr<HWTextureAllocator> allocator);
private:
- void UnpackFormat(TextureFormat format, glConst & layout, glConst & pixelType);
- int32_t GetID() const;
-
-private:
- int32_t m_textureID;
- uint32_t m_width;
- uint32_t m_height;
- TextureFormat m_format;
+ drape_ptr<HWTexture> m_hwTexture;
};
} // namespace dp