#include "beastapitypes.h"
The beast texture function definitions.
Enumerations | |
enum | ILBImageGammaType { ILB_IG_GAMMA } |
enum | ILBPixelFormat { ILB_PF_MONO_FLOAT, ILB_PF_RGB_FLOAT, ILB_PF_RGBA_FLOAT, ILB_PF_MONO_BYTE, ILB_PF_RGB_BYTE, ILB_PF_RGBA_BYTE } |
Functions | |
ILBStatus | ILBAddPixelDataHDR (ILBTextureHandle texture, const float *data, int32 pixelCount) |
ILBStatus | ILBAddPixelDataLDR (ILBTextureHandle texture, const unsigned char *data, int32 pixelCount) |
ILBStatus | ILBBeginTexture (ILBManagerHandle beastManager, ILBConstString uniqueName, int32 width, int32 height, ILBPixelFormat inputFormat, ILBTextureHandle *target) |
ILBStatus | ILBEndTexture (ILBTextureHandle texture) |
ILBStatus | ILBFindTexture (ILBManagerHandle beastManager, ILBConstString uniqueName, ILBTextureHandle *target) |
ILBStatus | ILBReferenceTexture (ILBManagerHandle beastManager, ILBConstString uniqueName, ILBConstString filename, ILBTextureHandle *target) |
ILBStatus | ILBSetInputGamma (ILBTextureHandle texture, ILBImageGammaType type, float gamma) |
enum ILBImageGammaType |
enum ILBPixelFormat |
Format for pixel data.
ILBStatus ILBAddPixelDataHDR | ( | ILBTextureHandle | texture, |
const float * | data, | ||
int32 | pixelCount | ||
) |
Adds pixels to a texture.
This function should only be used on textures using FLOAT pixel formats. Pixel data is treated as a linear array of pixels line by line. It may be called multiple times avoid having to replicate the entire image in Beast format, but the total number of pixels must not exceed what was specified in beginTexture.
The lines are given from the bottom and up, the lines are stored left to right.
texture | the texture to add the pixels for |
data | the pixel data to add. Note this must correspond to the pixel format specified in the beginTexture call |
pixelCount | the number of pixel (not data values) specified in this batch. |
ILBStatus ILBAddPixelDataLDR | ( | ILBTextureHandle | texture, |
const unsigned char * | data, | ||
int32 | pixelCount | ||
) |
Adds pixels to a texture.
This function should only be used on textures using BYTE pixel formats. Pixel data is treated as a linear array of pixels line by line. It may be called multiple times avoid having to replicate the entire image in Beast format, but the total number of pixels must not exceed what was specified in beginTexture.
The lines are given from the bottom and up, the lines are stored left to right.
texture | the texture to add the pixels for |
data | the pixel data to add. Note this must correspond to the pixel format specified in the beginTexture call |
pixelCount | the number of pixels (not data values) specified in this batch. |
ILBStatus ILBBeginTexture | ( | ILBManagerHandle | beastManager, |
ILBConstString | uniqueName, | ||
int32 | width, | ||
int32 | height, | ||
ILBPixelFormat | inputFormat, | ||
ILBTextureHandle * | target | ||
) |
Begins creation of a texture.
beastManager | the beast manager this texture will be associated with |
uniqueName | a unique name for the texture. |
width | the width of the texture |
height | the height of the texture |
inputFormat | the pixel format you intend to use to input data. This will not necessarily be the same format as Beast choose to save the image in. |
target | a pointer to a ILBTextureHandle that will receive the created texture |
ILBStatus ILBEndTexture | ( | ILBTextureHandle | texture | ) |
Finalizes creation of a texture.
Will fail unless it has got the width * height pixels added
texture | the texture to finalize |
ILBStatus ILBFindTexture | ( | ILBManagerHandle | beastManager, |
ILBConstString | uniqueName, | ||
ILBTextureHandle * | target | ||
) |
Finds a cached texture.
beastManager | the beast manager to check whether the texture is available in |
uniqueName | the unique name for texture. |
target | the texture handle to store the texture in |
ILBStatus ILBReferenceTexture | ( | ILBManagerHandle | beastManager, |
ILBConstString | uniqueName, | ||
ILBConstString | filename, | ||
ILBTextureHandle * | target | ||
) |
References in an external texture.
Note, a referenced texture doesn't need a call to ILBEndTexture!
beastManager | the beast manager this texture will be associated with |
uniqueName | A unique name for the texture. |
filename | the path to the file to use |
target | a pointer to a ILBTextureHandle that will receive the new created texture |
ILBStatus ILBSetInputGamma | ( | ILBTextureHandle | texture, |
ILBImageGammaType | type, | ||
float | gamma | ||
) |
Sets what gamma encoding the colors in LDR texture has.
This call is only valid on textures with an LDR pixel format. HDR textures are always regarded as linear. By default it's set to ILB_IG_GAMMA with gamma 2.2
texture | the texture to set gamma on |
type | the gamma ramp type |
gamma | the gamma value. |