Function _IrrCreateTexture

au3Irr2

au3Irr2 Function Reference

_IrrCreateTexture

Creates a blank texture.

#Include <au3Irrlicht2.au3>
_IrrCreateTexture($s_TextureName, $i_XSize, $i_YSize, $i_ColorFormat)

 

Parameters

$s_TextureName Texture_name as string.
$i_XSize Width of the texture.
$i_YSize Height of the texture.
$i_ColorFormat The format of the texture can be one of the following:
$ECF_A1R5G5B5 - 16 bit color format used by the software driver, and thus preferred by all other irrlicht engine video drivers.
$ECF_R5G6B5 - Standard 16 bit color format.
$ECF_R8G8B8 - 24 bit color, no alpha channel, but 8 bit for red, green and blue.
$ECF_A8R8G8B8 - Default 32 bit color format. 8 bits are used for every component: red, green, blue and alpha.

 

Return Value

Success: Handle of the newly created irrlicht texture object
Failure: False and @error 1

 

Remarks

None.

 

Related

_IrrDraw2DImage, _IrrGetTextureInformation, _IrrLockTexture, _IrrUnlockTexture

 

Example


#include "au3Irrlicht2.au3"

Global $hTexture

_IrrStart()

$hTexture = _IrrCreateTexture("MyTexture", 128, 128, $ECF_A8R8G8B8)

While _IrrRunning()

    _IrrBeginScene(255, 255, 0)
    _IrrDraw2DImage($hTexture, 0, 0)
    _IrrEndScene()

WEnd

_IrrStop()