#ifndef OPENGL_TEXTURE_HPP
#define OPENGL_TEXTURE_HPP

#include "open_engine/renderer/texture.hpp"

#include <GL/gl.h>

namespace OpenEngine {
    class OpenGLTexture2D : public Texture2D
    {
        public:
            OpenGLTexture2D(const std::string& path);
            OpenGLTexture2D(uint32_t width, uint32_t height);
            virtual ~OpenGLTexture2D();

            virtual uint32_t GetWidth() const override { return width; };
            virtual uint32_t GetHeight() const override { return height; };
            virtual uint32_t GetID() const override { return id; };

            virtual void Bind(uint32_t slot = 0) const override;

            virtual void SetData(void* data, uint32_t size) override;
            virtual bool operator==(const Texture& other) const override;

        private:
            std::string path;

            uint32_t width, height;
            uint32_t id;

            GLenum internal_format, data_format;
    };
}

#endif // OPENGL_TEXTURE_HPP
