- SCM device_type = scm_from_utf8_symbol ("software");
- SCM window_size = scm_list_2 (scm_from_uint32 (640),
- scm_from_uint32 (480));
- SCM bits = scm_from_uint32 (16);
- SCM fullscreen = scm_from_bool (0);
- SCM stencilbuffer = scm_from_bool (0);
- SCM vsync = scm_from_bool (0);
- SCM receiver = scm_from_bool (0);
-
- scm_c_bind_keyword_arguments ("create-device", rest, (scm_t_keyword_arguments_flags)0,
- scm_from_utf8_keyword ("device-type"), &device_type,
- scm_from_utf8_keyword ("window-size"), &window_size,
- scm_from_utf8_keyword ("bits"), &bits,
- scm_from_utf8_keyword ("fullscreen"), &fullscreen,
- scm_from_utf8_keyword ("stencilbuffer"), &stencilbuffer,
- scm_from_utf8_keyword ("vsync"), &vsync,
- scm_from_utf8_keyword ("receiver"), &receiver,
- SCM_UNDEFINED);
-
- irr::IrrlichtDevice* device =
- irr::createDevice (scm_to_driver_type (device_type),
- scm_to_dimension2d_u32 (window_size),
- scm_to_uint32 (bits),
- scm_to_bool (fullscreen),
- scm_to_bool (stencilbuffer),
- scm_to_bool (vsync));
- return wrap_device (device);