#include "color.h"
#include "device.h"
+#include "gui-environment.h"
#include "rect.h"
+#include "scene-manager.h"
#include "texture.h"
#include "video-driver.h"
#include "wrapped.h"
{
init_video_driver_type ();
scm_c_define_gsubr ("begin-scene", 1, 0, 1, (scm_t_subr)irr_video_beginScene);
+ scm_c_define_gsubr ("draw-all", 1, 0, 0, (scm_t_subr)irr_guiscene_drawAll);
+ scm_c_define_gsubr ("end-scene", 1, 0, 0, (scm_t_subr)irr_video_endScene);
scm_c_define_gsubr ("get-texture", 2, 0, 0, (scm_t_subr)irr_video_getTexture);
scm_c_define_gsubr ("get-video-driver", 1, 0, 0, (scm_t_subr)irr_getVideoDriver);
- scm_c_export ("begin-scene", "get-texture", "get-video-driver", NULL);
+ scm_c_export ("begin-scene", "draw-all", "end-scene", "get-texture",
+ "get-video-driver", NULL);
}
DEFINE_WRAPPED_TYPE (irr::video::IVideoDriver*, "video-driver",
sourceRectAddress));
}
+ SCM
+ irr_guiscene_drawAll (SCM wrapped_obj)
+ {
+ if (gui_environment_p (wrapped_obj))
+ {
+ unwrap_gui_environment (wrapped_obj)->drawAll ();
+ }
+ else if (scene_manager_p (wrapped_obj))
+ {
+ unwrap_scene_manager (wrapped_obj)->drawAll ();
+ }
+ else
+ {
+ scm_error (scm_arg_type_key, NULL, "Cannot draw all elements from object: ~S",
+ scm_list_1 (wrapped_obj), scm_list_1 (wrapped_obj));
+ }
+ return SCM_UNSPECIFIED;
+ }
+
+ SCM
+ irr_video_endScene (SCM wrapped_video_driver)
+ {
+ irr::video::IVideoDriver* driver = unwrap_video_driver (wrapped_video_driver);
+ return scm_from_bool (driver->endScene ());
+ }
+
SCM
irr_video_getTexture (SCM wrapped_video_driver,
SCM filename)