libultraship
Reimplementations of libultra (N64 SDK) functions for modern hardware
Loading...
Searching...
No Matches
Ship::GuiTexture Class Reference

A resource representing a texture intended for use in the GUI (ImGui). More...

#include <GuiTexture.h>

Inheritance diagram for Ship::GuiTexture:
[legend]
Collaboration diagram for Ship::GuiTexture:
[legend]

Public Member Functions

 GuiTexture ()
 Constructs an empty GuiTexture resource.
 
 ~GuiTexture ()
 Destructor. Frees the decoded pixel data.
 
void * GetPointer () override
 Returns a pointer to the raw pixel data.
 
size_t GetPointerSize () override
 Returns the size of the raw pixel data in bytes.
 
- Public Member Functions inherited from Ship::Resource< void >
void * GetRawPointer () override
 Returns a type-erased raw pointer to the underlying resource data.
 
 IResource (std::shared_ptr< ResourceInitData > initData)
 Constructs an IResource with the given initialization data.
 
- Public Member Functions inherited from Ship::IResource
 IResource (std::shared_ptr< ResourceInitData > initData)
 Constructs an IResource with the given initialization data.
 
virtual ~IResource ()
 
bool IsDirty ()
 Returns true if the resource has been marked dirty.
 
void Dirty ()
 Marks the resource as dirty.
 
std::shared_ptr< ResourceInitDataGetInitData ()
 Returns the initialization data used to load this resource.
 

Public Attributes

uint8_t * Data
 Raw decoded pixel data (RGBA).
 
size_t DataSize
 Size of the pixel data buffer in bytes.
 
GuiTextureMetadata Metadata
 Renderer metadata for this texture (ID, dimensions).
 

Additional Inherited Members

- Static Public Attributes inherited from Ship::IResource
static const std::string gAltAssetPrefix = "alt/"
 Path prefix that identifies an "alt asset" override.
 

Detailed Description

A resource representing a texture intended for use in the GUI (ImGui).

GuiTexture holds the raw decoded pixel data loaded from an archive and associated renderer metadata once the texture has been uploaded.

Constructor & Destructor Documentation

◆ GuiTexture()

Ship::GuiTexture::GuiTexture ( )

Constructs an empty GuiTexture resource.

◆ ~GuiTexture()

Ship::GuiTexture::~GuiTexture ( )

Destructor. Frees the decoded pixel data.

Member Function Documentation

◆ GetPointer()

void * Ship::GuiTexture::GetPointer ( )
overridevirtual

Returns a pointer to the raw pixel data.

Returns
Pointer to the pixel data buffer.

Implements Ship::Resource< void >.

◆ GetPointerSize()

size_t Ship::GuiTexture::GetPointerSize ( )
overridevirtual

Returns the size of the raw pixel data in bytes.

Returns
Size of the pixel data buffer.

Implements Ship::IResource.

Member Data Documentation

◆ Data

uint8_t* Ship::GuiTexture::Data

Raw decoded pixel data (RGBA).

◆ DataSize

size_t Ship::GuiTexture::DataSize

Size of the pixel data buffer in bytes.

◆ Metadata

GuiTextureMetadata Ship::GuiTexture::Metadata

Renderer metadata for this texture (ID, dimensions).


The documentation for this class was generated from the following file: