Function _IrrGetTexture

au3Irr2

au3Irr2 Function Reference

_IrrGetTexture

Loads 2D texture from bitmap file into video memory that can then be used to texture a model or to draw onto the screen.

#Include <au3Irrlicht2.au3>
_IrrGetTexture($s_ImageFile)

 

Parameters

$s_ImageFile Full path to the bitmap file.

 

Return Value

Success: Handle of the device dependend irrlicht texture object
Failure: False

 

Remarks

Irrlicht engine supports currently this image file formats:
JPEG File Interchange Format (.jpg, r/w) Portable Network Graphics (.png, r/w)
Truevision Targa (.tga, r/w) Windows Bitmap (.bmp, r/w)
Zsoft Paintbrush (.pcx, r/w) Portable Pixmaps (.ppm, r/w)
Adobe Photoshop (.psd, r) Quake 2 textures (.wal, r)

 

Related

_IrrRemoveTexture, _IrrGetImage

 

Example


#include "au3Irrlicht2.au3"

_IrrStart()

local $camera = _IrrAddCamera(2,2,2, 0,0,0 )

local $mesh = _IrrGetMesh( ".\media\capsuleX.obj" )
local $sceneNode = _IrrAddMeshToScene( $mesh )

local $texture = _IrrGetTexture(".\media\default_texture.png")
_IrrSetNodeMaterialTexture( $sceneNode, $texture, 0)
_IrrSetNodeMaterialFlag( $sceneNode, $IRR_EMF_LIGHTING, $IRR_OFF )

WHILE _IrrRunning()
    _IrrBeginScene(50, 50, 50)
    _IrrDrawScene()
    _IrrEndScene()
WEND

_IrrStop()