5#ifndef _GDL_WII_TEXTURE_H
6#define _GDL_WII_TEXTURE_H
70 void _ConvertTexture(
short xres,
short yres,
short stride,
void *inBuff,
void *outBuff);
71 bool _ConvertMipmap(
short xres,
short yres,
void *inBuff);
100 bool Create(
short xSize,
short ySize, u_int filterMode, u_int format);
133 bool CreateMipmapped(
short xSize,
short ySize, u_int minFilt, u_int magFilt,
short maxMipmaps, u_int format);
170 bool ConvertRawImage(
short rawXres,
short rawYres,
void *rawBuff,
short srcFormat);
193 void CopyFromScreen(
short x,
short y,
short width,
short height, u_char clearScreen);
250 void PokePixel(
short x,
short y, u_int col);
Texture handling class.
Definition mgdl-wii-texture.h:58
void Flush()
Flushes the texture's data block.
Definition wii-texture.cpp:1322
u_int TexSize()
Returns the size of the texture data in bytes.
Definition wii-texture.cpp:1513
virtual ~Texture()
Deconstructor.
Definition wii-texture.cpp:657
u_int PeekPixel(short x, short y)
Peeks a pixel from the texture.
Definition wii-texture.cpp:1410
void SetFilterMode(u_int minFilt, u_int magFilt)
Sets filter modes to a texture.
Definition wii-texture.cpp:1328
void PokePixel(short x, short y, u_int col)
Pokes a pixel into the texture.
Definition wii-texture.cpp:1340
bool Create(short xSize, short ySize, u_int filterMode, u_int format)
Creates a texture image.
Definition wii-texture.cpp:670
void Delete()
Deletes the texture (but not the object itself).
Definition wii-texture.cpp:1301
Texture()
Constructor.
Definition wii-texture.cpp:645
void SetWrapMode(u_int wrap_s, u_int wrap_t)
Sets the wrapping strategy of the texture.
Definition wii-texture.cpp:1334
bool LoadTexture(const char *fileName)
Loads a TPL texture file generated by gxtexconv.
Definition wii-texture.cpp:876
void CopyFromScreen(short x, short y, short width, short height, u_char clearScreen)
Copies pixel data from the active framebuffer.
Definition wii-texture.cpp:1290
GXTexObj * TexObj()
Returns a pointer to the GXTexObj object of the texture.
Definition wii-texture.cpp:1525
short TYsize()
Returns the Y size of the texture in pixels.
Definition wii-texture.cpp:1537
bool ConvertRawImage(short rawXres, short rawYres, void *rawBuff, short srcFormat)
Converts raw image data into a texture.
Definition wii-texture.cpp:1028
bool CreateMipmapped(short xSize, short ySize, u_int minFilt, u_int magFilt, short maxMipmaps, u_int format)
Creates a mipmapped texture image.
Definition wii-texture.cpp:747
short TexFmt()
Returns the texture format index of the texture.
Definition wii-texture.cpp:1519
void * TexAddr()
Returns the pointer to the texture data block.
Definition wii-texture.cpp:1507
short TXsize()
Returns the X size of the texture in pixels.
Definition wii-texture.cpp:1531
int MakeValuePOT(int value)
Pads out a value to make it a power-of-two.
Definition wii-texture.cpp:1544
TextureFormatModes
Definition mgdl-wii-texture.h:31
TextureAllocModes
Definition mgdl-wii-texture.h:46
void SetAutoFlush(bool flush)
Texture flusing mode.
Definition wii-texture.cpp:1553
void SetTexAllocMode(bool allocMode)
Sets which memory area the next texture will be allocated in.
Definition wii-texture.cpp:1559
@ IA8
16-bit intensity with alpha (monochrome) format (2 bytes per pixel).
Definition mgdl-wii-texture.h:35
@ I8
8-bit intensity (alpha) format (1 pixel per byte).
Definition mgdl-wii-texture.h:33
@ I4
4-bit intensity (alpha) format (2 pixels per byte).
Definition mgdl-wii-texture.h:32
@ RGB5A3
16-bit RGB5A3 pixel format (RGB5 if pixel is opaque, RGB4A3 if pixel is translucent,...
Definition mgdl-wii-texture.h:37
@ IA4
8-bit intensity with alpha (monochrome) format (1 byte per pixel).
Definition mgdl-wii-texture.h:34
@ RGB565
16-bit RGB565 pixel format (2 bytes per pixel).
Definition mgdl-wii-texture.h:36
@ RGBA8
32-bit RGBA8 pixel format (4 bytes per pixel).
Definition mgdl-wii-texture.h:38
@ MEM1
Allocate texture in MEM1.
Definition mgdl-wii-texture.h:47
@ MEM2
Allocate texture in MEM2.
Definition mgdl-wii-texture.h:48
Library namespace.
Definition wii-globals.cpp:12