psl1ght
A free SDK for Sony's PS3 console
|
RSX Texture data structure. More...
#include <gcm_sys.h>
Data Fields | |
u8 | format |
Texture format. More... | |
u8 | mipmap |
Indicates if this is a mip-mapped texture. More... | |
u8 | dimension |
Texture dimension. More... | |
u8 | cubemap |
Indicates if this is a cube-mapped texture. More... | |
u32 | remap |
Color remapping bitfield. More... | |
u16 | width |
Texture width in pixels. | |
u16 | height |
Texture height in pixels. | |
u16 | depth |
Texture depth. | |
u8 | location |
Location of texture. Possible values are: More... | |
u8 | _pad |
unused padding byte. | |
u32 | pitch |
Size of a texture line in bytes. | |
u32 | offset |
Offset of texture data. | |
RSX Texture data structure.
u8 _gcmTexture::cubemap |
u8 _gcmTexture::dimension |
u8 _gcmTexture::format |
Texture format.
This is an OR-ed combination of the following values:
u8 _gcmTexture::location |
Location of texture. Possible values are:
u8 _gcmTexture::mipmap |
u32 _gcmTexture::remap |
Color remapping bitfield.
Each of the texture color components (red, green, blue, alpha) can be remapped according to a specified remapping type. The type specifies that the component is either set to zero, all one bits, or takes value of one of the source components. All remapping types and values are to be OR-ed together.
For instance, to have the alpha component set to zero, the red and blue components swapped and the green component kept as-is, set the following value:
(GCM_TEXTURE_REMAP_TYPE_ZERO << GCM_TEXTURE_REMAP_TYPE_A_SHIFT)
| (GCM_TEXTURE_REMAP_TYPE_REMAP << GCM_TEXTURE_REMAP_TYPE_R_SHIFT)
| (GCM_TEXTURE_REMAP_COLOR_B << GCM_TEXTURE_REMAP_COLOR_R_SHIFT)
| (GCM_TEXTURE_REMAP_TYPE_REMAP << GCM_TEXTURE_REMAP_TYPE_G_SHIFT)
| (GCM_TEXTURE_REMAP_COLOR_G << GCM_TEXTURE_REMAP_COLOR_G_SHIFT)
| (GCM_TEXTURE_REMAP_TYPE_REMAP << GCM_TEXTURE_REMAP_TYPE_B_SHIFT)
| (GCM_TEXTURE_REMAP_COLOR_R << GCM_TEXTURE_REMAP_COLOR_B_SHIFT)