|
| CGLESTexture (unsigned int width=0, unsigned int height=0, XB_FMT format=XB_FMT_A8R8G8B8) |
|
| ~CGLESTexture () override |
|
void | CreateTextureObject () override |
|
void | DestroyTextureObject () override |
|
void | LoadToGPU () override |
|
void | BindToUnit (unsigned int unit) override |
|
| CTexture (unsigned int width=0, unsigned int height=0, XB_FMT format=XB_FMT_A8R8G8B8) |
|
virtual | ~CTexture () |
|
bool | LoadFromMemory (unsigned int width, unsigned int height, unsigned int pitch, XB_FMT format, bool hasAlpha, const unsigned char *pixels) |
|
bool | LoadPaletted (unsigned int width, unsigned int height, unsigned int pitch, XB_FMT format, const unsigned char *pixels, const COLOR *palette) |
|
void | Update (unsigned int width, unsigned int height, unsigned int pitch, XB_FMT format, const unsigned char *pixels, bool loadToGPU) |
|
void | LoadToGPUAsync () |
| Uploads the texture to the GPU.
|
|
virtual void | SyncGPU () |
| Blocks execution until the previous GFX commands have been processed.
|
|
| CTextureBase ()=default |
|
| ~CTextureBase ()=default |
|
bool | HasAlpha () const |
|
void | SetAlpha (bool hasAlpha) |
|
void | SetMipmapping () |
| sets mipmapping. do not use in new code. will be replaced with proper scaling.
|
|
bool | IsMipmapped () const |
| return true if we want to mipmap
|
|
void | SetScalingMethod (TEXTURE_SCALING scalingMethod) |
| sets the scaling method. scanout systems might support more than NN/linear.
|
|
TEXTURE_SCALING | GetScalingMethod () const |
| returns the scaling method.
|
|
int32_t | GetOrientation () const |
|
void | SetOrientation (int orientation) |
|
void | SetCacheMemory (bool bCacheMemory) |
| retains a shadow copy of the texture on the CPU side.
|
|
bool | GetCacheMemory () const |
| returns true if a shadow copy is kept on the CPU side.
|
|
uint8_t * | GetPixels () const |
| returns a pointer to the staging texture.
|
|
uint32_t | GetPitch () const |
| return the size of one row in bytes.
|
|
uint32_t | GetRows () const |
| return the number of rows (number of blocks in the Y direction).
|
|
uint32_t | GetTextureWidth () const |
| return the total width of the texture, which might be scaled to fit its displayed size.
|
|
uint32_t | GetTextureHeight () const |
| return the total height of the texture, which might be scaled to fit its displayed size.
|
|
uint32_t | GetWidth () const |
| return the total width of "active" area, which might be equal or lower than the texture width due to alignment.
|
|
uint32_t | GetHeight () const |
| return the total height of "active" area, which might be equal or lower than the texture height due to alignment.
|
|
uint32_t | GetOriginalWidth () const |
| return the original width of the image, before scaling/cropping
|
|
uint32_t | GetOriginalHeight () const |
| return the original height of the image, before scaling/cropping
|
|
void | Allocate (uint32_t width, uint32_t height, XB_FMT format) |
|
void | ClampToEdge () |
|
|
void | SetSwizzle (bool swapRB) |
|
void | SwapBlueRedSwizzle (GLint &component) |
|
TextureFormat | GetFormatGLES20 (KD_TEX_FMT textureFormat) |
|
TextureFormat | GetFormatGLES30 (KD_TEX_FMT textureFormat) |
|
bool | LoadFromFileInMem (unsigned char *buffer, size_t size, const std::string &mimeType, unsigned int maxWidth, unsigned int maxHeight) |
|
bool | LoadFromFileInternal (const std::string &texturePath, unsigned int maxWidth, unsigned int maxHeight, bool requirePixels, const std::string &strMimeType="") |
|
bool | LoadIImage (IImage *pImage, unsigned char *buffer, unsigned int bufSize, unsigned int width, unsigned int height) |
|
uint32_t | GetPitch (uint32_t width) const |
|
uint32_t | GetRows (uint32_t height) const |
|
uint32_t | GetBlockWidth () const |
|
uint32_t | GetBlockHeight () const |
|
uint32_t | GetBlockSize () const |
| return the size of a compression block (tile) in bytes.
|
|
void | SetKDFormat (XB_FMT xbFMT) |
|
|
static std::unique_ptr< CTexture > | CreateTexture (unsigned int width=0, unsigned int height=0, XB_FMT format=XB_FMT_A8R8G8B8) |
|
static std::unique_ptr< CTexture > | LoadFromFile (const std::string &texturePath, unsigned int idealWidth=0, unsigned int idealHeight=0, bool requirePixels=false, const std::string &strMimeType="") |
| Load a texture from a file Loads a texture from a file, restricting in size if needed based on maxHeight and maxWidth. Note that these are the ideal size to load at - the returned texture may be smaller or larger than these.
|
|
static std::unique_ptr< CTexture > | LoadFromFileInMemory (unsigned char *buffer, size_t bufferSize, const std::string &mimeType, unsigned int idealWidth=0, unsigned int idealHeight=0) |
| Load a texture from a file in memory Loads a texture from a file in memory, restricting in size if needed based on maxHeight and maxWidth. Note that these are the ideal size to load at - the returned texture may be smaller or larger than these.
|
|
static uint32_t | PadPow2 (uint32_t x) |
| rounds to power of two. deprecated.
|
|
static bool | SwapBlueRed (uint8_t *pixels, uint32_t height, uint32_t pitch, uint32_t elements=4, uint32_t offset=0) |
| swaps the blue/red channel. deprecated in this form.
|
|