]> git.jsancho.org Git - guile-irrlicht.git/commitdiff
make-vertex3d
authorJavier Sancho <jsf@jsancho.org>
Fri, 15 May 2020 14:37:04 +0000 (16:37 +0200)
committerJavier Sancho <jsf@jsancho.org>
Fri, 15 May 2020 14:37:04 +0000 (16:37 +0200)
irrlicht.scm
irrlicht/video.scm
src/vertex3d.cpp

index e2e5a9bc92d131fba8ab928fddb5be764cfe8119..7d730c9ac77a40b45e69a8e45d82fb12b7f4790d 100644 (file)
@@ -51,6 +51,7 @@
                is-empty?
                is-window-active?
                make-box3d
+               make-vertex3d
                run
                set-material-flag!
                set-material-texture!
index 1fa6d640ded684f9ba3aa833376509180e6bcad5..596c7742542beca7bbab2c74b50b5677293a1fb6 100644 (file)
      filename)))
 
 (export <video-driver> begin-scene end-scene get-fps get-name get-texture)
+
+
+;; S3DVertex
+(define-class <vertex3d> (<irrlicht-base>)
+  (irr-class #:init-value "S3DVertex"))
+
+(define (make-vertex3d position normal color tcoords)
+  (let ((S3DVertex_make (get-irrlicht-proc "S3DVertex_make")))
+    (make <vertex3d>
+      #:irr-pointer
+      (S3DVertex_make position normal color tcoords))))
+
+(export <vertex3d> make-vertex3d)
index 2bc305c524f5624146bd3e92d6d15cc759b50c87..b7b57e2c70ef52bdf2a360566861117150ab36c2 100644 (file)
 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