Re-implement RGBA textures

This commit is contained in:
2026-03-28 15:21:33 -05:00
parent 6823a4ddb5
commit 87d2d9123e
7 changed files with 270 additions and 187 deletions

View File

@@ -13,6 +13,8 @@ typedef union texturedata_u texturedata_t;
typedef enum {
TEXTURE_FORMAT_RGBA = GX_TF_RGBA8,
TEXTURE_FORMAT_PALETTE = GX_TF_CI8,
TEXTURE_FORMAT_RGB4A3 = GX_TF_RGB5A3,
TEXTURE_FORMAT_RGB5 = GX_TF_RGB565,
} textureformatdolphin_t;
typedef struct {
@@ -20,6 +22,11 @@ typedef struct {
textureformatdolphin_t format;
int32_t width;
int32_t height;
union {
uint8_t *rgba;
// u16 *rgba;
};
} texturedolphin_t;
/**
@@ -54,10 +61,4 @@ errorret_t textureBindDolphin(texturedolphin_t *texture);
* @param texture The texture to dispose.
* @return An error if the texture failed to dispose, otherwise success.
*/
errorret_t textureDisposeDolphin(texturedolphin_t *texture);
/**
* Internal method that uploads the texture environment variables to the GPU
* for rendering. This is basically uploading the shader information.
*/
void textureDolphinUploadTEV(void);
errorret_t textureDisposeDolphin(texturedolphin_t *texture);