Function _IrrBlendTextures

au3Irr2

au3Irr2 Function Reference

_IrrBlendTextures

Blend the source texture into the destination texture to create a single texture.

#Include <au3Irrlicht2.au3>
_IrrBlendTextures($h_TextureDest, $h_TextureSrc, $i_Xoffset, $i_Yoffset, $i_Operation)

 

Parameters

$h_TextureDest Handle to the Destination irrlicht texture object.
$h_TextureSrc Handle to the Source irrlicht texture object.
$i_Xoffset X position where the Source texture will be drawn into the Desination texture.
$i_Yoffset Y position where the Source texture will be drawn into the Desination texture.
$i_Operation Can be one of the following:
$BLEND_SCREEN ; 0
$BLEND_ADD ; 1
$BLEND_SUBTRACT ; 2
$BLEND_MULTIPLY ; 3
$BLEND_DIVIDE ; 4

 

Return Value

Success: True
Failure: False and set @error, check @extended to see what the error is.
    @extended 0 then the @error is autoit failed the DllCall
    @extended 1 Incompatible texture types
    @extended 2 Unsupported texture format, must be 32bit

 

Remarks

Textures must be 32 bit format.

 

Related

_IrrGetTexture, _IrrCreateTexture, _IrrDraw2DImage

 

Example


#include "au3Irrlicht2.au3"

Global $hTextureDest, $hTextureSrc

_IrrStart()

$hTextureDest = _IrrGetTexture("./media/Diagonal.bmp")
$hTextureSrc = _IrrGetTexture("./media/cross.bmp")

_IrrBlendTextures($hTextureDest, $hTextureSrc, 0, 0, $BLEND_MULTIPLY)

While _IrrRunning() And Sleep(10)

    _IrrBeginScene(50, 50, 50)
    _IrrDraw2DImage($hTextureDest, 0, 0)
    _IrrEndScene()

WEnd

_IrrStop()