CreateTexture()
Syntax
Result = CreateTexture(#Texture, Width, Height)Description
Creates a new blank #Texture with the specified dimension (in pixels). If #PB_Any is used as '#Texture' parameter, the new texture number will be returned as 'Result'.
It's strongly recommended to make the texture square and with power of 2 width/height: 64x64, 128x128, 256x256... Old GFX cards can have limitation, so if possible limit the texture size to 256x256.
If the 'Result' is 0, the texture creation has failed. If the #Texture was already created, it is automatically freed and replaced by the new one.
Example:
CreateTexture(0, 256, 256) ; Creates a new 256x256 texture
Supported OS
All