Function _IrrSetNodeMaterialFlag

au3Irr2

au3Irr2 Function Reference

_IrrSetNodeMaterialFlag

Sets material properies of a node that will effect its appearance on the screen.

#Include <au3Irrlicht2.au3>
_IrrSetNodeMaterialFlag($h_Node, $i_Type, $i_Flag)

 

Parameters

$h_Node Handle of a node in the scene
$i_Type Material type is one of the following properties:
$IRR_EMF_WIREFRAME - Render as wireframe outline
$IRR_EMF_GOURAUD_SHADING - Render smoothly across polygons
$IRR_EMF_LIGHTING - Material is effected by lighting
$IRR_EMF_ZBUFFER - Enable z buffer
$IRR_EMF_ZWRITE_ENABLE - Can write as well as read z buffer
$IRR_EMF_BACK_FACE_CULLING - Cull polygons facing away
$IRR_EMF_BILINEAR_FILTER - Enable bilinear filtering
$IRR_EMF_TRILINEAR_FILTER - Enable trilinear filtering
$IRR_EMF_ANISOTROPIC_FILTER - Reduce blur in distant textures
$IRR_EMF_FOG_ENABLE - Enable fogging in the distance
$IRR_EMF_NORMALIZE_NORMALS - Use when scaling dynamically lighted models
$i_Flag Switches selected property on or off:
$IRR_ON
$IRR_OFF

 

Return Value

Success: True
Failure: False

 

Remarks

None.

 

Related

_IrrSetNodeMaterialTexture, _IrrSetNodeMaterialType

 

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()