/* Created by Jenny White on 30.04.18. Copyright (c) 2018 nullworks. All rights reserved. */ #pragma once #include #include #include #include namespace glez { class texture { public: texture() { } static texture loadFromFile(const std::string& path); static texture loadFromMemory(const std::byte* mem, std::size_t size, unsigned w, unsigned h); texture(texture&&); ~texture(); texture& operator=(texture&&); void bind(); inline bool isLoaded() { return this->init; } public: bool init = false; bool bound = false; int width = 0; int height = 0; GLuint id; GLubyte* data; public: [[deprecated]] int getWidth() const { return this->width; } [[deprecated]] int getHeight() const { return this->height; } [[deprecated]] unsigned getHandle() const { return 1; } [[deprecated]] bool canLoad() const { return true; } [[deprecated]] void load() { } [[deprecated]] void unload() { } [[deprecated]] const std::string path; }; } // namespace glez