#include <irrlicht/irrlicht.h>
#include <libguile.h>
-#include "animated-mesh-scene-node.h"
-#include "material-flags.h"
-#include "scene-node.h"
extern "C" {
- void
- init_material_flag (void)
- {
- scm_c_define_gsubr ("set-material-flag!", 3, 0, 0, (scm_t_subr)irr_scene_setMaterialFlag);
- scm_c_export ("set-material-flag!", NULL);
- }
-
- SCM
- irr_scene_setMaterialFlag (SCM wrapped_obj,
- SCM flag,
- SCM newvalue)
- {
- if (animated_mesh_scene_node_p (wrapped_obj))
- {
- unwrap_animated_mesh_scene_node (wrapped_obj)->setMaterialFlag (scm_to_material_flag (flag),
- scm_to_bool (newvalue));
- }
- else if (scene_node_p (wrapped_obj))
- {
- unwrap_scene_node (wrapped_obj)->setMaterialFlag (scm_to_material_flag (flag),
- scm_to_bool (newvalue));
- }
- else
- {
- scm_error (scm_arg_type_key, NULL, "Cannot set material flag for object: ~S",
- scm_list_1 (wrapped_obj), scm_list_1 (wrapped_obj));
- }
- return SCM_UNSPECIFIED;
- }
-
irr::video::E_MATERIAL_FLAG
scm_to_material_flag (SCM material_flag)
{