]> git.jsancho.org Git - guile-irrlicht.git/blobdiff - src/video-driver.cpp
get-video-driver
[guile-irrlicht.git] / src / video-driver.cpp
index 85a720ef59212059c40ac9bff3df99286ee0cc5f..61683f2436459c24734641160e9588b227ab27e1 100644 (file)
@@ -23,7 +23,6 @@
 #include <libguile.h>
 
 #include "color.h"
-#include "device.h"
 #include "gsubr.h"
 #include "gui-environment.h"
 #include "material.h"
@@ -47,7 +46,6 @@ extern "C" {
     DEFINE_GSUBR ("end-scene", 1, 0, 0, irr_video_endScene);
     DEFINE_GSUBR ("get-fps", 1, 0, 0, irr_video_getFPS);
     DEFINE_GSUBR ("get-texture", 2, 0, 0, irr_video_getTexture);
-    DEFINE_GSUBR ("get-video-driver", 1, 0, 0, irr_getVideoDriver);
     DEFINE_GSUBR ("set-transform!", 3, 0, 0, irr_video_setTransform);
   }
 
@@ -66,7 +64,7 @@ extern "C" {
                             scm_from_uint32 (0),
                             scm_from_uint32 (0));
     SCM video_data = SCM_BOOL_F;
-    SCM source_rect = SCM_BOOL_F;
+    SCM source_rect = SCM_UNDEFINED;
 
     scm_c_bind_keyword_arguments ("begin-scene", rest, (scm_t_keyword_arguments_flags)0,
                                   scm_from_utf8_keyword ("back-buffer"), &back_buffer,
@@ -78,7 +76,7 @@ extern "C" {
 
     irr::video::IVideoDriver* driver = unwrap_video_driver (wrapped_video_driver);
     irr::core::rect<irr::s32>* sourceRectAddress = 0;
-    if (!scm_is_false (source_rect))
+    if (source_rect != SCM_UNDEFINED)
       {
         irr::core::rect<irr::s32> sourceRect = scm_to_rect_s32 (source_rect);
         sourceRectAddress = &sourceRect;
@@ -182,22 +180,6 @@ extern "C" {
     return SCM_UNSPECIFIED;
   }
 
-  SCM
-  irr_getVideoDriver (SCM wrapped_obj)
-  {
-    irr::video::IVideoDriver* driver;
-    if (device_p (wrapped_obj))
-      {
-        driver = unwrap_device (wrapped_obj)->getVideoDriver ();
-      }
-    else
-      {
-        scm_error (scm_arg_type_key, NULL, "Cannot get video driver from object: ~S",
-                   scm_list_1 (wrapped_obj), scm_list_1 (wrapped_obj));
-      }
-    return wrap_video_driver (driver);
-  }
-
   irr::video::E_TRANSFORMATION_STATE
   scm_to_transformation_state (SCM transformation_state)
   {