Rasterfarm-SDK
Loading...
Searching...
No Matches
TextureImage Class Reference

#include <textureimage.h>

Classes

class  Texture2DUploadTask
 
class  TextureCubeUploadTask
 
class  TextureUploadTask
 

Public Types

typedef Function< void(Byte *) > UploadCallbackFunction
 

Static Public Member Functions

static Byte * allocPixelsFromImage (Image *pImage, PixelFormat &pixelFormat, BufferType &pixelData)
 
static void loadTexture2DThread (Texture *pTexture, String *pFilename)
 
static void loadTextureCubeThread (Texture *pTexture, String aFilename[])
 
static Texturetexture2DFromRawPixels (Texture *pTexture, Byte *pImage, const Texture::Attribute &attribute)
 
static TexturetextureCubeFromRawPixels (Texture *pTexture, Byte *pImage[6], const Texture::Attribute attribute[6])
 
static Texturetexture2DFromImage (Texture *pTexture, Image *pImage, bool mipmap)
 
static TexturetextureCubeFromImages (Texture *pTexture, Image *pImage[6], bool mipmap)
 
static Texturetexture2DFromFile (Texture *pTexture, const char *filename, bool mipmap, bool loadAsync)
 
static TexturetextureCubeFromFile (Texture *pTexture, const char *filename[6], bool mipmap, bool loadAsync)
 

Friends

class Application
 
class Texture2DUploadTask
 

Member Typedef Documentation

◆ UploadCallbackFunction

typedef Function< void( Byte * ) > TextureImage::UploadCallbackFunction

Member Function Documentation

◆ allocPixelsFromImage()

static Byte * TextureImage::allocPixelsFromImage ( Image * pImage,
PixelFormat & pixelFormat,
BufferType & pixelData )
static

Allocates pixel-data from an Image. This is allocated fom the heap and the caller is responible for freeing the memory.

Parameters
Imageobject.
Targetformat of the returned data.
Pixeldata-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
Pointerto the texture object.
Pointerto the filename containing the pixel data.
Makesa 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
Pointerto the texture object.
Pointerto the filename-array containing the pixel data.
Makesa 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
Pointerto the texture object.
Filenamecontainting image data.
Trueto create a logarithmic-set of mipmaps.
Trueif 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
Pointerto the texture object.
Pointerto the image.
Trueif mipmaps are to be autogenerated.
Returns
The pointer to the texture object passed as 1st argument.

◆ texture2DFromRawPixels()

static Texture * TextureImage::texture2DFromRawPixels ( Texture * pTexture,
Byte * pImage,
const Texture::Attribute & attribute )
static

Allocates a 2d texture from raw pixel data.

Parameters
Pointerto the texture object.
Pixeldata with given component size of one byte.
Textureattribute 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
Pointerto the texture object.
Filenamearray containting image data for each cube-face side ordered by: POSITIVE_X, NEGATIVE_X, POSITIVE_Y, NEGATIVE_Y, POSITIVE_Z, NEGATIVE_Z,
Trueto 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
Pointerto the texture object.
Pointerto the image.
Trueif mipmaps are to be autogenerated.
Returns
The pointer to the texture object passed as 1st argument.

◆ textureCubeFromRawPixels()

static Texture * TextureImage::textureCubeFromRawPixels ( Texture * pTexture,
Byte * pImage[6],
const Texture::Attribute attribute[6] )
static

Uploads a cube texture with raw pixel data.

Parameters
Pointerto the texture object.
Pixeldata with given component size of one byte.
Textureattribute describing the pixel data.
Returns
The pointer to the texture object passed as 1st argument.

Friends And Related Symbol Documentation

◆ Application

friend class Application
friend

◆ Texture2DUploadTask

friend class Texture2DUploadTask
friend

The documentation for this class was generated from the following file: