]> git.jsancho.org Git - guile-irrlicht.git/blobdiff - src/material.cpp
gui-in-out-fader
[guile-irrlicht.git] / src / material.cpp
index 3d32f2110489c9f4a692fd9601bb7ad9d9419965..eccf8aae867ce7201a7524cee88fb8c6628553ea 100644 (file)
@@ -23,6 +23,7 @@
 #include <libguile.h>
 
 #include "color.h"
+#include "gsubr.h"
 #include "material.h"
 #include "material-types.h"
 #include "wrapped.h"
@@ -33,8 +34,7 @@ extern "C" {
   init_material (void)
   {
     init_material_type ();
-    scm_c_define_gsubr ("make-material", 0, 0, 1, (scm_t_subr)make_material);
-    scm_c_export ("make-material", NULL);
+    DEFINE_GSUBR ("make-material", 0, 0, 1, make_material);
   }
 
   DEFINE_WRAPPED_TYPE (irr::video::SMaterial*, "material",
@@ -64,16 +64,16 @@ extern "C" {
     SCM blend_operation = scm_from_utf8_symbol ("none");
     SCM polygon_offset_factor = scm_from_uint8 (0);
     SCM polygon_offset_direction = scm_from_utf8_symbol ("front");
-    SCM wireframe = scm_from_bool (0);
-    SCM point_cloud = scm_from_bool (0);
-    SCM gouraud_shading = scm_from_bool (1);
-    SCM lighting = scm_from_bool (1);
-    SCM z_write_enable = scm_from_bool (1);
-    SCM backface_culling = scm_from_bool (1);
-    SCM frontface_culling = scm_from_bool (0);
-    SCM fog_enable = scm_from_bool (0);
-    SCM normalize_normals = scm_from_bool (0);
-    SCM use_mip_maps = scm_from_bool (1);
+    SCM wireframe = SCM_BOOL_F;
+    SCM point_cloud = SCM_BOOL_F;
+    SCM gouraud_shading = SCM_BOOL_T;
+    SCM lighting = SCM_BOOL_T;
+    SCM z_write_enable = SCM_BOOL_T;
+    SCM backface_culling = SCM_BOOL_T;
+    SCM frontface_culling = SCM_BOOL_F;
+    SCM fog_enable = SCM_BOOL_F;
+    SCM normalize_normals = SCM_BOOL_F;
+    SCM use_mip_maps = SCM_BOOL_T;
 
     scm_c_bind_keyword_arguments
       ("make-material", rest, (scm_t_keyword_arguments_flags)0,