|
| Texture ()=default |
| Construct a texture resource.
|
|
| Texture (const Texture &other)=delete |
| Copying disabled since copying a texture resource might be a resource-intensive operation.
|
|
| Texture (Texture &&other)=default |
| Move construct a texture from the given texture other.
|
|
| ~Texture () |
| Destroy a texture.
|
|
Texture & | operator= (Texture &&other)=default |
| Move assign a texture from the given texture other.
|
|
MappedTexture< uint8_t > | map (uint16_t width, uint16_t height, TextureFormat format, bool generateMipMap) |
| Map the texture data, ensuring the data is sized to hold width * height * bpp of the format bytes.
|
|
template<typename Element > |
MappedTexture< Element > | map (uint16_t width, uint16_t height, bool generateMipMap) |
| Map the texture data, ensuring the data is sized to hold width * height * sizeof(Element) bytes.
|
|
template<typename Element > |
MappedTexture< Element > | map (uint16_t width, uint16_t height, TextureFormat format, bool generateMipMap) |
| Map the texture data, ensuring the data is sized to hold width * height * sizeof(Element) bytes.
|
|
void | unmap () |
| Unmap the currently mapped texture data.
|
|
void | setData (ResourceDimensions target, const void *data, size_t size, int width, int height, TextureFormat format, bool generateMipMap) |
| Set the texture data.
|
|
void | setData (ResourceDimensions target, const void *data, size_t size, int width, int height, int levels, TextureFormat format, bool generateMipMap) |
|
void COGSCORE_DLL_API | setData (ResourceDimensions target, const void *data, size_t size, uint32_t width, uint32_t height, uint32_t depth, uint32_t layers, uint32_t faces, uint32_t levels, TextureFormat format, bool generateMipMap) |
|
void | clearData () |
|
bool | empty () |
|
void * | mapInternal (uint16_t width, uint16_t height, TextureFormat format, bool mipMap) |
|
| ResourceBase ()=default |
| Constructs a new resource base.
|
|
| ResourceBase (const ResourceBase &other)=delete |
| Disable trivial copies of resources.
|
|
ResourceBase & | operator= (const ResourceBase &other)=delete |
| Disable copy-assignment of resources.
|
|
| ResourceBase (ResourceBase &&other) |
| Move constructs a resource base from other.
|
|
ResourceBase & | operator= (ResourceBase &&other) |
| Move assign the resource from the given ResourceBase other.
|
|
| ~ResourceBase () |
| Destructs the resource.
|
|
void | setInitialized () |
|
void | setChanged () |
|
bool | hasChanged () const |
|
void | setLoading () |
|
void | setLoaded () |
|
void | setFailedLoad () |
|
void | setActive () |
|
void | setResident () |
|
void | setProxy () |
|
void | setKeepStorage () |
|
bool | isInitialized () const |
|
bool | isLoaded () const |
|
bool | isActive () const |
|
bool | isResident () const |
|
bool | isDependency () const |
|
bool | isDeleted () const |
|
bool | isOrphaned () const |
|
bool | isProxy () const |
|
bool | hasFailedLoad () const |
|
bool | hasFailedActivation () const |
|
bool | keepStorage () const |
|
void | setType (ResourceTypes type) |
| Set the type enumeration of the resource.
|
|
ResourceTypes | getType () const |
| Gets the type enumeration of the resource.
|
|
void | setId (ResourceId resourceId) |
| Set the resource id of the resource.
|
|
ResourceId | getId () const |
| Get the resource id of this instance.
|
|
void | setFlag (ResourceFlags flags) |
| Set the given resource flag.
|
|
void | setFlags (ResourceFlags flags) |
|
void | unsetFlag (ResourceFlags flag) |
| Unset the given flag.
|
|
bool | isSet (ResourceFlags flag) const |
| Check if the given flag is currently set.
|
|
ResourceFlags | getFlags () const |
| Get the current flags of the resource.
|
|
void | attachResource (RenderResource *attachment) |
| Attach the given GPU resource to the resource.
|
|
bool | hasAttachedResource () const |
| Check if the resource has an attachment.
|
|
RenderResource * | getAttachedResource () const |
| Get the attached resource.
|
|
void | setOwner (IResourceManager *owner) |
| Sets the owner of this resource instance.
|
|
IResourceManager * | getOwner () const |
|
void | setName (const StringView &name) |
| Set the user friendly name of the resource.
|
|
StringView | getName () const |
| Get the name of the resource.
|
|
void | setSource (const StringView &source) |
|
StringView | getSource () const |
|
void | increment () |
| Increments the reference count of the resource.
|
|
void | decrement () |
| Decrement the reference count of the resource.
|
|
uint32_t | referenceCount () const |
| Get the current reference count.
|
|
void | incrementGeneration () |
| Increment the generation count.
|
|
uint32_t | getGeneration () const |
| Get the generation count.
|
|
void | setSlot (uint32_t slot) |
| Sets the slot at which the resource is internally tracked.
|
|
uint32_t | getSlot () const |
| Gets the slot where the resource is tracked internally.
|
|
Texture resources contain raster bitmap data to use for texturing.
Textures can be used as input to materials defining surface properties of the material. In addition, textures are used to store bitmap fonts by the FontManager.
The texture may function as a wrapper to an externally defined texture, in which case the texture data is not contained by the texture itself, only an externalHandle to the actual texture is held.
Texture resources are loaded, processed and activated by the TextureManager.
Definition at line 90 of file Texture.h.