(define-module (irrlicht scene)
#:export (add-animated-mesh-scene-node
- get-mesh))
+ get-mesh
+ set-material-flag!))
(load-extension "libguile-irrlicht" "init_guile_irrlicht")
#include "gui-element.h"
#include "gui-environment.h"
#include "gui-static-text.h"
+#include "material-flags.h"
#include "reference-counted.h"
#include "scene-manager.h"
#include "scene-node.h"
init_gui_element ();
init_gui_environment ();
init_gui_static_text ();
+ init_material_flag ();
init_reference_counted ();
init_scene_manager ();
init_scene_node ();
#include <irrlicht/irrlicht.h>
#include <libguile.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
+ irr_scene_setMaterialFlag (SCM wrapped_obj,
+ SCM flag,
+ SCM newvalue)
+ {
+ 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)
{
extern "C" {
+ void
+ init_material_flag (void);
+
+ SCM
+ irr_scene_setMaterialFlag (SCM wrapped_obj,
+ SCM flag,
+ SCM newvalue);
+
irr::video::E_MATERIAL_FLAG
scm_to_material_flag (SCM material_flag);