28 lines
657 B
C++
28 lines
657 B
C++
#ifndef OPENGL_TEXTURE_HPP
|
|
#define OPENGL_TEXTURE_HPP
|
|
|
|
#include <cstdint>
|
|
#include <renderer/texture.hpp>
|
|
|
|
namespace OpenEngine {
|
|
class OpenGLTexture2D : public Texture2D
|
|
{
|
|
public:
|
|
OpenGLTexture2D(const std::string& path);
|
|
virtual ~OpenGLTexture2D();
|
|
|
|
virtual uint32_t GetWidth() const override { return width; };
|
|
virtual uint32_t GetHeight() const override { return height; };
|
|
|
|
virtual void Bind(uint32_t slot = 0) const override;
|
|
|
|
private:
|
|
std::string path;
|
|
|
|
uint32_t width, height;
|
|
uint32_t id;
|
|
};
|
|
}
|
|
|
|
#endif // OPENGL_TEXTURE_HPP
|