On this page
fsRenderCreateTexture
The fsRenderCreateTexture function creates a new texture.
Syntax
int fsRenderCreateTexture(
FsContext ctx,
int type,
int w,
int h,
int imageFlags,
const unsigned char* data,
const char* debugName
)Members
| Parameters | Description |
|---|---|
ctx | A value of type FsContext provided as an argument of the gauge callback. |
type | The texture type: 1 for Alpha only, 2 for RGBA. |
w | The width of the texture to create. |
h | The height of the texture to create. |
imageFlags | A combination - using logical or - of the following values:1 to generate mipmaps automaticallyFS_RENDER_IMAGE_REPEATX (2) to repeat the image in the X directionFS_RENDER_IMAGE_REPEATY (4) to repeat the image in the Y directionFS_RENDER_IMAGE_FLIPY (8) to flip the image on the Y axisFS_RENDER_IMAGE_PREMULTIPLIED (16) to indicate that the image data has premultiplied alphaFS_RENDER_IMAGE_NEAREST (32) to specify a Nearest instead of a Linear interpolation |
data | The texture data. |
debugName | The texture name for debugging purposes. |
Return Values
This function returns a handle to the created texture (to be used by the image member of the FsPaint structure) if it is successful, or 0 if it failed.
Remarks
N/A
Prev
fsRenderCreateNext
fsRenderDelete