![]() |
citro3d
1.2.0
|
Tex3DS routines. More...

Data Structures | |
| struct | Tex3DS_Texture |
| Tex3DS texture. More... | |
| struct | Tex3DSi_SubTexture |
Functions | |
| struct | __attribute__ ((packed)) |
| static bool | Tex3DSi_ReadData (decompressCallback callback, void **userdata, void *buffer, size_t size, size_t *insize) |
| static Tex3DS_Texture | Tex3DSi_ImportCommon (C3D_Tex *tex, C3D_TexCube *texcube, bool vram, decompressCallback callback, void *userdata, size_t insize) |
| Tex3DS_Texture | Tex3DS_TextureImport (const void *input, size_t insize, C3D_Tex *tex, C3D_TexCube *texcube, bool vram) |
| Import Tex3DS texture. More... | |
| Tex3DS_Texture | Tex3DS_TextureImportCallback (C3D_Tex *tex, C3D_TexCube *texcube, bool vram, decompressCallback callback, void *userdata) |
| Import Tex3DS texture. More... | |
| Tex3DS_Texture | Tex3DS_TextureImportFD (int fd, C3D_Tex *tex, C3D_TexCube *texcube, bool vram) |
| Import Tex3DS texture. More... | |
| Tex3DS_Texture | Tex3DS_TextureImportStdio (FILE *fp, C3D_Tex *tex, C3D_TexCube *texcube, bool vram) |
| Import Tex3DS texture. More... | |
| size_t | Tex3DS_GetNumSubTextures (const Tex3DS_Texture texture) |
| Get number of subtextures. More... | |
| const Tex3DS_SubTexture * | Tex3DS_GetSubTexture (const Tex3DS_Texture texture, size_t index) |
| Get subtexture. More... | |
| void | Tex3DS_TextureFree (Tex3DS_Texture texture) |
| Free Tex3DS texture. More... | |
Variables | |
| Tex3DSi_Header | |
Tex3DS routines.
| struct __attribute__ | ( | (packed) | ) |
| size_t Tex3DS_GetNumSubTextures | ( | const Tex3DS_Texture | texture | ) |
Get number of subtextures.
| [in] | texture | Tex3DS texture |
| const Tex3DS_SubTexture* Tex3DS_GetSubTexture | ( | const Tex3DS_Texture | texture, |
| size_t | index | ||
| ) |
Get subtexture.
| [in] | texture | Tex3DS texture |
| [in] | index | Subtexture index |
| void Tex3DS_TextureFree | ( | Tex3DS_Texture | texture | ) |
Free Tex3DS texture.
| [in] | texture | Tex3DS texture to free |
| Tex3DS_Texture Tex3DS_TextureImport | ( | const void * | input, |
| size_t | insize, | ||
| C3D_Tex * | tex, | ||
| C3D_TexCube * | texcube, | ||
| bool | vram | ||
| ) |
Import Tex3DS texture.
| [in] | input | Input data |
| [in] | insize | Size of the input data |
| [out] | tex | citro3d texture |
| [out] | texcube | citro3d texcube |
| [in] | vram | Whether to store textures in VRAM |
| Tex3DS_Texture Tex3DS_TextureImportCallback | ( | C3D_Tex * | tex, |
| C3D_TexCube * | texcube, | ||
| bool | vram, | ||
| decompressCallback | callback, | ||
| void * | userdata | ||
| ) |
Import Tex3DS texture.
@description For example, use this if you want to import from a large file without pulling the entire file into memory.
| [out] | tex | citro3d texture |
| [out] | texcube | citro3d texcube |
| [in] | vram | Whether to store textures in VRAM |
| [in] | callback | Data callback |
| [in] | userdata | User data passed to callback |
| Tex3DS_Texture Tex3DS_TextureImportFD | ( | int | fd, |
| C3D_Tex * | tex, | ||
| C3D_TexCube * | texcube, | ||
| bool | vram | ||
| ) |
Import Tex3DS texture.
Starts reading at the current file descriptor's offset. The file descriptor's position is left at the end of the decoded data. On error, the file descriptor's position is indeterminate.
| [in] | fd | Open file descriptor |
| [out] | tex | citro3d texture |
| [out] | texcube | citro3d texcube |
| [in] | vram | Whether to store textures in VRAM |
| Tex3DS_Texture Tex3DS_TextureImportStdio | ( | FILE * | fp, |
| C3D_Tex * | tex, | ||
| C3D_TexCube * | texcube, | ||
| bool | vram | ||
| ) |
Import Tex3DS texture.
Starts reading at the current file stream's offset. The file stream's position is left at the end of the decoded data. On error, the file stream's position is indeterminate.
| [in] | fp | Open file stream |
| [out] | tex | citro3d texture |
| [out] | texcube | citro3d texcube |
| [in] | vram | Whether to store textures in VRAM |
|
static |
|
inlinestatic |
| Tex3DSi_Header |