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
  • ai_load_ogl_texture_from_buffer    xtlang
  • analogue-load-preset    scheme
  • analogue-load-state    scheme
  • assimp_load_model    xtlang
  • assimp_load_model    scheme
  • cerberus-load-preset    scheme
  • cerberus-load-state    scheme
  • db_load    xtlang
  • dsp_load    xtlang
  • get_download_handler    xtlang
  • get_load_handler    xtlang
  • gl_load_image    xtlang
  • gl_load_image_rect    xtlang
  • gl_load_movie_textures    xtlang
  • gl_load_movie_textures    xtlang
  • gl_load_tex    xtlang
  • gl_load_tex_bgr    xtlang
  • gl_load_tex_ext    xtlang
  • gl_load_tex_ext_bgr    xtlang
  • gl_load_tex_rect    xtlang
  • impc:aot:insert-load-dylib-details    scheme
  • impc:compiler:print-dylib-loading-details-to-log    scheme
  • ipc:load    scheme
  • is_loading    xtlang
  • lilv_load_plugin    xtlang
  • load-sample    scheme
  • load-sampler    scheme
  • load-tex    xtlang
  • load-tex    xtlang
  • load_assim_material_texture    xtlang
  • load_blep_tables_from_blob    unknown
  • load_cube_data    xtlang
  • load_data    xtlang
  • load_vg_fonts    xtlang
  • model_update    xtlang
  • nvg_load_opensans_fonts    xtlang
  • print-load    scheme
  • print_xtmmodel    xtlang
  • reload    xtlang
  • reload_ignore_cache    xtlang
  • stop_load    xtlang
  • sys:load    scheme
  • sys:load-escape    scheme
  • sys:load-preload-check    scheme
  • sys:load-then-quit    scheme
  • xtm_draw_model    xtlang
  • xtm_draw_model    xtlang
  • xtm_load_vgimage    xtlang
  • xtm_make_model    xtlang
  • xtm_model_child    xtlang
  • xtm_model_mesh    xtlang
  • xtm_projection_texture_load    xtlang