Bindless OpenGL 2D Texture.
void unbind() const noexcept
Unbind sampler.
Texture & operator=(Texture &&) noexcept
Move assignment operator.
bool load(const std::string &file)
Load a texture from vfs.
bool load_mem(std::span< std::uint8_t > buffer)
Loads texture from memory.
void save(std::string_view file)
Saves texture to file on disk.
Texture(const Texture &)=delete
Copy constructor.
void bind() const noexcept
Bind to sampler.
float height() const noexcept
Get texture height.
unsigned int id() const noexcept
Get OpenGL texture id.
Texture & operator=(const Texture &)=delete
Copy assignment operator.
TextureView get_view(const unsigned int minlevel, const unsigned int numlevels, const unsigned int minlayer, const unsigned int numlayers) const noexcept
Generate a texture view handle.
std::uint64_t handle() const noexcept
Get OpenGL bindless handle.
float width() const noexcept
Get texture width.