Result = CreateTexture(#Texture, Width, Height [, TextureName$])
Creates a new blank texture with the specified dimension.


#Texture A number to identify the new texture. #PB_Any can be used to auto-generate this number.
Width, Height The size of the new texture, in pixels. The width and height of the texture should be each preferably be powers of 2, and if possible, make them square because this will look best on the most hardware. Examples: 64x64, 128x128, 256x256, but also 128x64, 16x32... Old GFX cards can have limitation, so if possible limit the texture size to 256x256.
TextureName$ (optional) The name of the new texture in the OGRE system. This allow to use this name in script to assign a shader to this texture

Return value

Nonzero if the texture was successfully created, zero otherwise. If #PB_Any was used for the #Texture parameter then the generated number is returned on success.


  CreateTexture(0, 256, 256) ; Creates a new 256x256 texture

Supported OS


<- CreateRenderTexture() - Texture Index - EntityCubeMapTexture() ->