# fsRenderCreateTexture The **fsRenderCreateTexture** creates a new texture.   ##### Syntax ``` wasm int fsRenderCreateTexture( FsContext ctx, int type, int w, int h, int imageFlags, const unsigned char* data, const char* debugName ) ```   ##### Members
ParametersDescription
ctxA value of type FsContext provided as an argument of the gauge callback.
typeThe texture type: -1 for Alpha only, 2 for RGBA.
wThe width of the texture to create.
hThe height of the texture to create.
imageFlags

A combination - using logical or - of the following values:

  • 1 to generate mipmaps automatically
  • 2 to repeat the image in the X direction
  • 4 to repeat the image in the Y direction
  • 8 to flip the image on the Y axis
  • 16 to indicate that the image data has premultiplied alpha
  • 32 to specify a Nearest instead of a Linear interpolation
dataThe texture data.
debugNameThe 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`](../structures/fspaint/) structure) if it is successful, or 0 if it failed.   ##### Remarks N/A