add load image from url

This commit is contained in:
2019-09-26 14:53:44 +02:00
parent 0a8c3aeaf2
commit e406f7964c
6 changed files with 152 additions and 4 deletions

View File

@@ -17,7 +17,10 @@ public:
glm::vec2 m_sz;
glm::vec2 m_scale = { 1.f, 1.f };
std::string m_path;
std::string m_url;
uint16_t m_tex_id;
std::shared_ptr<Asset> m_remote_asset;
std::shared_ptr<Texture2D> m_remote_texture;
static void static_init();
virtual Node* clone_instantiate() const override;
virtual void clone_copy(Node* dest) const override;
@@ -25,5 +28,7 @@ public:
virtual void restore_context() override;
virtual void parse_attributes(kAttribute ka, const tinyxml2::XMLAttribute* attr) override;
virtual void draw() override;
virtual void added(Node* parent) override;
bool set_image(const std::string& path);
void load_url(const std::string& url);
};