tec::TextureObject
#include <texture-object.hpp>
Public Functions
Name | |
---|---|
TextureObject() | |
~TextureObject() | |
TextureObject(const PixelBuffer & image) new texture instance from image |
|
TextureObject(std::weak_ptr< PixelBuffer > pbp) new texture instance from an image pointer |
|
TextureObject(const TextureObject & ) =delete | |
TextureObject & | operator=(const TextureObject & ) =delete |
TextureObject(TextureObject && other) | |
TextureObject & | operator=(TextureObject && other) |
void | Destroy() delete the underlaying GL texture |
GLuint | GetID() get the ID of the texture note: this method is not const, since GL can modify the texture with the ID |
bool | IsDynamic() |
void | Update() |
void | SetCompare(bool c) |
void | Load(const PixelBuffer & image) create a texture from an image |
Protected Attributes
Name | |
---|---|
GLuint | texture_id |
bool | compare |
std::weak_ptr< PixelBuffer > | source_ptr |
Public Functions Documentation
function TextureObject
inline TextureObject()
function ~TextureObject
~TextureObject()
function TextureObject
TextureObject(
const PixelBuffer & image
)
new texture instance from image
function TextureObject
TextureObject(
std::weak_ptr< PixelBuffer > pbp
)
new texture instance from an image pointer
function TextureObject
TextureObject(
const TextureObject &
) =delete
function operator=
TextureObject & operator=(
const TextureObject &
) =delete
function TextureObject
TextureObject(
TextureObject && other
)
function operator=
TextureObject & operator=(
TextureObject && other
)
function Destroy
void Destroy()
delete the underlaying GL texture
function GetID
inline GLuint GetID()
get the ID of the texture note: this method is not const, since GL can modify the texture with the ID
Return: GLuint the GL texture ID
function IsDynamic
inline bool IsDynamic()
Return: true if the texture was created dynamic
function Update
void Update()
Called by the RenderSystem to update dynamic textures
function SetCompare
inline void SetCompare(
bool c
)
function Load
void Load(
const PixelBuffer & image
)
create a texture from an image
Protected Attributes Documentation
variable texture_id
GLuint texture_id {0};
variable compare
bool compare {0};
variable source_ptr
std::weak_ptr< PixelBuffer > source_ptr;
Updated on 2022-07-24 at 19:27:35 +0000