X-Git-Url: https://git.jsancho.org/?a=blobdiff_plain;f=src%2Fvertex3d.cpp;h=f6adab086d5371d8352dee98cfb0814c55a64c4a;hb=e88bb6a9636fd75d12e71993cac35b9d4cff0d77;hp=27bf94137077833fa97a6351df6fe9bc17401f81;hpb=37217d692d4ead81cfed829395a9a7a5caf9325c;p=guile-irrlicht.git diff --git a/src/vertex3d.cpp b/src/vertex3d.cpp index 27bf941..f6adab0 100644 --- a/src/vertex3d.cpp +++ b/src/vertex3d.cpp @@ -62,4 +62,27 @@ extern "C" { return scm_from_vector3df (s3dvertex->Pos); } + irr::video::E_VERTEX_TYPE + scm_to_vertex_type (SCM vertex_type) + { + char* type = scm_to_utf8_stringn (scm_symbol_to_string (vertex_type), NULL); + if (!strcmp (type, "standard")) + { + return irr::video::EVT_STANDARD; + } + else if (!strcmp (type, "2tcoords")) + { + return irr::video::EVT_2TCOORDS; + } + else if (!strcmp (type, "tangents")) + { + return irr::video::EVT_TANGENTS; + } + else + { + scm_error (scm_arg_type_key, NULL, "Wrong vertex_type: ~S", + scm_list_1 (vertex_type), scm_list_1 (vertex_type)); + } + } + }