libultraship
Reimplementations of libultra (N64 SDK) functions for modern hardware
Loading...
Searching...
No Matches
GuiTexture.h
Go to the documentation of this file.
1#pragma once
2
4#include <stb_image.h>
5
6namespace Ship {
7
9#define RESOURCE_TYPE_GUI_TEXTURE 0x47544558 // GTEX
10
18 int32_t Width;
20 int32_t Height;
21};
22
29class GuiTexture : public Resource<void> {
30 public:
31 using Resource::Resource;
32
35
38
43 void* GetPointer() override;
44
49 size_t GetPointerSize() override;
50
52 uint8_t* Data;
53
55 size_t DataSize;
56
59};
60}; // namespace Ship
A resource representing a texture intended for use in the GUI (ImGui).
Definition GuiTexture.h:29
size_t DataSize
Size of the pixel data buffer in bytes.
Definition GuiTexture.h:55
~GuiTexture()
Destructor. Frees the decoded pixel data.
GuiTexture()
Constructs an empty GuiTexture resource.
void * GetPointer() override
Returns a pointer to the raw pixel data.
uint8_t * Data
Raw decoded pixel data (RGBA).
Definition GuiTexture.h:52
size_t GetPointerSize() override
Returns the size of the raw pixel data in bytes.
GuiTextureMetadata Metadata
Renderer metadata for this texture (ID, dimensions).
Definition GuiTexture.h:58
Typed resource base class that provides a strongly-typed pointer accessor.
Definition Resource.h:73
Core namespace for the libultraship engine framework.
Definition gfx_direct3d_common.h:14
Metadata describing a GUI texture after it has been uploaded to the renderer.
Definition GuiTexture.h:14
int32_t Height
Height of the texture in pixels.
Definition GuiTexture.h:20
int32_t Width
Width of the texture in pixels.
Definition GuiTexture.h:18
uint32_t RendererTextureId
Renderer-assigned texture identifier (e.g. OpenGL texture name).
Definition GuiTexture.h:16