Function _IrrColorKeyTexture

au3Irr2

au3Irr2 Function Reference

_IrrColorKeyTexture

Copies any parts of the texture that are the same as the specified color into the textures alpha channel.

#Include <au3Irrlicht2.au3>
_IrrColorKeyTexture($h_Texture, $i_Red, $i_Green, $i_Blue)

 

Parameters

$h_Texture Handle of the texture object
$i_Red Red value from 0 to 255
$i_Green Green value from 0 to 255
$i_Blue Blue value from 0 to 255

 

Return Value

Success: True
Failure: False

 

Remarks

This can be used for special effects or to make these regions transparent.

 

Related

None.

 

Example


#include "au3Irrlicht2.au3"

_IrrStart()

local $logo = _IrrGetTexture("./media/cross.bmp")
_IrrColorKeyTexture($logo, 255, 255, 255)

WHILE _IrrRunning()
    _IrrBeginScene(50, 0, 0)
    _IrrDraw2DImageElement( $logo, 0, 0 , 0, 0, 128, 64, $IRR_IGNORE_ALPHA)
    _IrrDraw2DImageElement( $logo, 0, 64, 0, 64, 128, 128, $IRR_USE_ALPHA)
    _IrrEndScene()
WEND

_IrrStop()