#include <textureimage.h>
|
static Byte * | allocPixelsFromImage (Image *pImage, PixelFormat &pixelFormat, BufferType &pixelData) |
|
static void | loadTexture2DThread (Texture *pTexture, String *pFilename) |
|
static void | loadTextureCubeThread (Texture *pTexture, String aFilename[]) |
|
static Texture * | texture2DFromRawPixels (Texture *pTexture, Byte *pImage, const Texture::Attribute &attribute) |
|
static Texture * | textureCubeFromRawPixels (Texture *pTexture, Byte *pImage[6], const Texture::Attribute attribute[6]) |
|
static Texture * | texture2DFromImage (Texture *pTexture, Image *pImage, bool mipmap) |
|
static Texture * | textureCubeFromImages (Texture *pTexture, Image *pImage[6], bool mipmap) |
|
static Texture * | texture2DFromFile (Texture *pTexture, const char *filename, bool mipmap, bool loadAsync) |
|
static Texture * | textureCubeFromFile (Texture *pTexture, const char *filename[6], bool mipmap, bool loadAsync) |
|
◆ UploadCallbackFunction
◆ allocPixelsFromImage()
Allocates pixel-data from an Image. This is allocated fom the heap and the caller is responible for freeing the memory.
- Parameters
-
Image | object. |
Target | format of the returned data. |
Pixel | data-type of the returned data. |
◆ loadTexture2DThread()
static void TextureImage::loadTexture2DThread |
( |
Texture * | pTexture, |
|
|
String * | pFilename ) |
|
static |
Allocation method for creating raw pixel-data from an Image object.
- Parameters
-
Pointer | to the texture object. |
Pointer | to the filename containing the pixel data. |
Makes | a copy of the filename for thread-safety as a const char * may be passed |
- Returns
- Byte-array allocated from heap-memory. Caller is responsible for free/deleting this memory.
◆ loadTextureCubeThread()
static void TextureImage::loadTextureCubeThread |
( |
Texture * | pTexture, |
|
|
String | aFilename[] ) |
|
static |
- Parameters
-
Pointer | to the texture object. |
Pointer | to the filename-array containing the pixel data. |
Makes | a copy of the filename for thread-safety as a const char * may be passed |
◆ texture2DFromFile()
static Texture * TextureImage::texture2DFromFile |
( |
Texture * | pTexture, |
|
|
const char * | filename, |
|
|
bool | mipmap, |
|
|
bool | loadAsync ) |
|
static |
Uploads a 2d texture with image pixel data from the filesystem.
- Parameters
-
Pointer | to the texture object. |
Filename | containting image data. |
True | to create a logarithmic-set of mipmaps. |
True | if non-blocking while image-data is loading. Data will be loaded from file on a separate thread. |
- Returns
- The pointer to the texture object passed as 1st argument.
◆ texture2DFromImage()
static Texture * TextureImage::texture2DFromImage |
( |
Texture * | pTexture, |
|
|
Image * | pImage, |
|
|
bool | mipmap ) |
|
static |
Uploads a 2d texture with image pixel data.
- Parameters
-
Pointer | to the texture object. |
Pointer | to the image. |
True | if mipmaps are to be autogenerated. |
- Returns
- The pointer to the texture object passed as 1st argument.
◆ texture2DFromRawPixels()
Allocates a 2d texture from raw pixel data.
- Parameters
-
Pointer | to the texture object. |
Pixel | data with given component size of one byte. |
Texture | attribute describing the pixel data. |
◆ textureCubeFromFile()
static Texture * TextureImage::textureCubeFromFile |
( |
Texture * | pTexture, |
|
|
const char * | filename[6], |
|
|
bool | mipmap, |
|
|
bool | loadAsync ) |
|
static |
Uploads a cube texture with image pixel data from the filesystem.
- Parameters
-
Pointer | to the texture object. |
Filename | array containting image data for each cube-face side ordered by: POSITIVE_X, NEGATIVE_X, POSITIVE_Y, NEGATIVE_Y, POSITIVE_Z, NEGATIVE_Z, |
True | to create a logarithmic-set of mipmaps. |
- Returns
- The pointer to the texture object passed as 1st argument.
◆ textureCubeFromImages()
static Texture * TextureImage::textureCubeFromImages |
( |
Texture * | pTexture, |
|
|
Image * | pImage[6], |
|
|
bool | mipmap ) |
|
static |
Uploads a cube texture with image pixel data.
- Parameters
-
Pointer | to the texture object. |
Pointer | to the image. |
True | if mipmaps are to be autogenerated. |
- Returns
- The pointer to the texture object passed as 1st argument.
◆ textureCubeFromRawPixels()
Uploads a cube texture with raw pixel data.
- Parameters
-
Pointer | to the texture object. |
Pixel | data with given component size of one byte. |
Texture | attribute describing the pixel data. |
- Returns
- The pointer to the texture object passed as 1st argument.
◆ Application
◆ Texture2DUploadTask
friend class Texture2DUploadTask |
|
friend |
The documentation for this class was generated from the following file: