From: Javier Sancho Date: Fri, 15 May 2020 14:37:04 +0000 (+0200) Subject: make-vertex3d X-Git-Url: https://git.jsancho.org/?p=guile-irrlicht.git;a=commitdiff_plain;h=1a76862e831371dd0a7eb74b460c93b5932165c1 make-vertex3d --- diff --git a/irrlicht.scm b/irrlicht.scm index e2e5a9b..7d730c9 100644 --- a/irrlicht.scm +++ b/irrlicht.scm @@ -51,6 +51,7 @@ is-empty? is-window-active? make-box3d + make-vertex3d run set-material-flag! set-material-texture! diff --git a/irrlicht/video.scm b/irrlicht/video.scm index 1fa6d64..596c774 100644 --- a/irrlicht/video.scm +++ b/irrlicht/video.scm @@ -71,3 +71,16 @@ filename))) (export begin-scene end-scene get-fps get-name get-texture) + + +;; S3DVertex +(define-class () + (irr-class #:init-value "S3DVertex")) + +(define (make-vertex3d position normal color tcoords) + (let ((S3DVertex_make (get-irrlicht-proc "S3DVertex_make"))) + (make + #:irr-pointer + (S3DVertex_make position normal color tcoords)))) + +(export make-vertex3d) diff --git a/src/vertex3d.cpp b/src/vertex3d.cpp index 2bc305c..b7b57e2 100644 --- a/src/vertex3d.cpp +++ b/src/vertex3d.cpp @@ -31,10 +31,10 @@ using namespace irr; SCM -video_S3DVertex_make (SCM position, - SCM normal, - SCM color, - SCM tcoords) +S3DVertex_make (SCM position, + SCM normal, + SCM color, + SCM tcoords) { video::S3DVertex* vertex = new video::S3DVertex (scm_to_vector3df (position), @@ -45,7 +45,7 @@ video_S3DVertex_make (SCM position, } SCM -video_S3DVertex_Pos (SCM vertex) { +S3DVertex_Pos (SCM vertex) { video::S3DVertex* s3dvertex = (video::S3DVertex*) scm_to_irr_pointer (vertex); return scm_from_vector3df (s3dvertex->Pos); } @@ -53,8 +53,8 @@ video_S3DVertex_Pos (SCM vertex) { void init_vertex3d (void) { - DEFINE_GSUBR ("video_S3DVertex_make", 4, 0, 0, video_S3DVertex_make); - DEFINE_GSUBR ("video_S3DVertex_Pos", 1, 0, 0, video_S3DVertex_Pos); + DEFINE_GSUBR ("S3DVertex_make", 4, 0, 0, S3DVertex_make); + DEFINE_GSUBR ("S3DVertex_Pos", 1, 0, 0, S3DVertex_Pos); } video::E_VERTEX_TYPE