Bindless OpenGL 2D Texture.
void unbind() const noexcept
Deactivate sampler.
void set_anisotropy() const noexcept
Set ansiotropic filtering level.
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 set_filter() const noexcept
Sets filter when texture is (up/down)scaled in OpenGL.
void save(std::string_view file)
Saves texture to file on disk.
void set_mode() const noexcept
Set texture mode.
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.
void recreate()
Deletes texture data and configuration in OpenGL.
Texture & operator=(const Texture &)=delete
Copy assignment operator.
std::uint64_t handle() const noexcept
Get OpenGL bindless handle.
float width() const noexcept
Get texture width.