assimp_load_model   xtlang


Defined in:  https://github.com/digego/extempore/tree/v0.8.9/libs/external/assimp.xtm

Implementation

;; where post is any post processing required
;; if value is 0 then use default
;; of (+ aiProcess_FindDegenerates aiProcess_Triangulate)
;; if value > 0 then use post exactly as defined
;; which means the user must add AT LEAST aiProcess_Triangulate
;;
(bind-func assimp_load_model
  (lambda (dir file post)
    (let ((lgth (+ (strlen dir) (strlen file) 1))
          (scene:aiScene* null)
          (path:i8* (salloc lgth)))
      (memset path 0 lgth)
      (memcpy path dir (strlen dir))
      (memcpy (pref-ptr path (strlen dir)) file (strlen file))
      (if (> post 0)
          (set! scene (aiImportFile path post))
          (set! scene (aiImportFile path (+ aiProcess_FindDegenerates aiProcess_PreTransformVertices aiProcess_OptimizeMeshes aiProcess_OptimizeGraph aiProcess_Triangulate))))
      ;;(set! scene (aiImportFile path 498379))
      (let ((root:XTMModel*
             (if (null? scene)
                 (begin (printf "Bad Asset! %s\n" path) (cast null XTMModel*))
                 (ai_build_scene scene dir))))
        (if (not (null? scene))
            (begin ;; (printf "delete scene: %p\n" scene)
              (aiReleaseImport scene)))
        root))))


Back to Index

Similar Entries

  • ai_load_ogl_texture    xtlang    /digego/extempore/tree/v0.8.9/libs/external/assimp.xtm
  • ai_load_ogl_texture_from_buffer    xtlang    /digego/extempore/tree/v0.8.9/libs/external/assimp.xtm
  • analogue-load-preset    scheme    /digego/extempore/tree/v0.8.9/libs/core/instruments/analogue_fileio-scm.xtm
  • analogue-load-state    scheme    /digego/extempore/tree/v0.8.9/libs/core/instruments/analogue_fileio-scm.xtm
  • assimp_load_model    xtlang    /digego/extempore/tree/v0.8.9/libs/external/assimp.xtm
  • assimp_load_model    scheme    /digego/extempore/tree/v0.8.9/libs/external/assimp.xtm
  • cerberus-load-preset    scheme    /digego/extempore/tree/v0.8.9/libs/core/instruments/cerberus_fileio-scm.xtm
  • cerberus-load-state    scheme    /digego/extempore/tree/v0.8.9/libs/core/instruments/cerberus_fileio-scm.xtm
  • db_load    xtlang    /digego/extempore/tree/v0.8.9/examples/external/sqlite.xtm
  • dsp_load    xtlang    /digego/extempore/tree/v0.8.9/examples/sharedsystem/audiosetup.xtm
  • get_download_handler    xtlang    /digego/extempore/tree/v0.8.9/libs/external/cef/cef.xtm
  • get_load_handler    xtlang    /digego/extempore/tree/v0.8.9/libs/external/cef/cef.xtm
  • gl_load_image    xtlang    /digego/extempore/tree/v0.8.9/libs/external/soil.xtm
  • gl_load_image_rect    xtlang    /digego/extempore/tree/v0.8.9/libs/external/soil.xtm
  • gl_load_movie_textures    xtlang    /digego/extempore/tree/v0.8.9/examples/contrib/gstvideo_multi.xtm
  • gl_load_movie_textures    xtlang    /digego/extempore/tree/v0.8.9/examples/contrib/gstvideo.xtm
  • gl_load_tex    xtlang    /digego/extempore/tree/v0.8.9/libs/external/soil.xtm
  • gl_load_tex_bgr    xtlang    /digego/extempore/tree/v0.8.9/libs/external/soil.xtm
  • gl_load_tex_ext    xtlang    /digego/extempore/tree/v0.8.9/libs/external/soil.xtm
  • gl_load_tex_ext_bgr    xtlang    /digego/extempore/tree/v0.8.9/libs/external/soil.xtm
  • gl_load_tex_rect    xtlang    /digego/extempore/tree/v0.8.9/libs/external/soil.xtm
  • impc:aot:insert-load-dylib-details    scheme    /digego/extempore/tree/v0.8.9/runtime/llvmti.xtm
  • impc:compiler:print-dylib-loading-details-to-log    scheme    /digego/extempore/tree/v0.8.9/runtime/llvmti.xtm
  • ipc:load    scheme    /digego/extempore/tree/v0.8.9/runtime/llvmti.xtm
  • is_loading    xtlang    /digego/extempore/tree/v0.8.9/libs/external/cef/cef.xtm
  • lilv_load_plugin    xtlang    /digego/extempore/tree/v0.8.9/libs/contrib/lilv.xtm
  • load-sample    scheme    /digego/extempore/tree/v0.8.9/libs/external/instruments_ext-scm.xtm
  • load-sampler    scheme    /digego/extempore/tree/v0.8.9/libs/external/instruments_ext-scm.xtm
  • load-tex    xtlang    /digego/extempore/tree/v0.8.9/examples/contrib/particles.xtm
  • load-tex    xtlang    /digego/extempore/tree/v0.8.9/examples/contrib/kinect_fire.xtm
  • load_assim_material_texture    xtlang    /digego/extempore/tree/v0.8.9/libs/external/assimp.xtm
  • load_blep_tables_from_blob    unknown    /digego/extempore/tree/v0.8.9/libs/core/audio_dsp.xtm
  • load_cube_data    xtlang    /digego/extempore/tree/v0.8.9/libs/external/gl/gl-objects2.xtm
  • load_data    xtlang    /digego/extempore/tree/v0.8.9/libs/external/gl/gl-objects2.xtm
  • load_vg_fonts    xtlang    /digego/extempore/tree/v0.8.9/examples/external/xtmrender5.xtm
  • model_update    xtlang    /digego/extempore/tree/v0.8.9/examples/contrib/horde3d_knight.xtm
  • nvg_load_opensans_fonts    xtlang    /digego/extempore/tree/v0.8.9/libs/external/nanovg.xtm
  • print-load    scheme    /digego/extempore/tree/v0.8.9/examples/external/convolution_reverb.xtm
  • print_xtmmodel    xtlang    /digego/extempore/tree/v0.8.9/libs/external/graphics-pipeline.xtm
  • reload    xtlang    /digego/extempore/tree/v0.8.9/libs/external/cef/cef.xtm
  • reload_ignore_cache    xtlang    /digego/extempore/tree/v0.8.9/libs/external/cef/cef.xtm
  • stop_load    xtlang    /digego/extempore/tree/v0.8.9/libs/external/cef/cef.xtm
  • sys:load    scheme    /digego/extempore/tree/v0.8.9/runtime/scheme.xtm
  • sys:load-escape    scheme    /digego/extempore/tree/v0.8.9/runtime/scheme.xtm
  • sys:load-preload-check    scheme    /digego/extempore/tree/v0.8.9/runtime/scheme.xtm
  • sys:load-then-quit    scheme    /digego/extempore/tree/v0.8.9/runtime/scheme.xtm
  • xtm_draw_model    xtlang    /digego/extempore/tree/v0.8.9/libs/external/graphics-pipeline.xtm
  • xtm_draw_model    xtlang    /digego/extempore/tree/v0.8.9/libs/external/graphics-pipeline.xtm
  • xtm_load_vgimage    xtlang    /digego/extempore/tree/v0.8.9/libs/contrib/openvg.xtm
  • xtm_make_model    xtlang    /digego/extempore/tree/v0.8.9/libs/external/graphics-pipeline.xtm
  • xtm_model_child    xtlang    /digego/extempore/tree/v0.8.9/libs/external/graphics-pipeline.xtm
  • xtm_model_mesh    xtlang    /digego/extempore/tree/v0.8.9/libs/external/graphics-pipeline.xtm
  • xtm_projection_texture_load    xtlang    /digego/extempore/tree/v0.8.9/libs/external/graphics-pipeline.xtm