+ SCM
+ irr_scene_setMaterialTexture (SCM wrapped_scene_node,
+ SCM texture_layer,
+ SCM texture)
+ {
+ if (animated_mesh_scene_node_p (wrapped_scene_node))
+ {
+ unwrap_animated_mesh_scene_node (wrapped_scene_node)->
+ setMaterialTexture (scm_to_uint32 (texture_layer),
+ unwrap_texture (texture));
+ }
+ else if (scene_node_p (wrapped_scene_node))
+ {
+ unwrap_scene_node (wrapped_scene_node)->
+ setMaterialTexture (scm_to_uint32 (texture_layer),
+ unwrap_texture (texture));
+ }
+ else
+ {
+ scm_error (scm_arg_type_key, NULL, "Cannot set material texture to object: ~S",
+ scm_list_1 (wrapped_scene_node), scm_list_1 (wrapped_scene_node));
+ }
+ return SCM_UNSPECIFIED;
+ }
+