load_assim_material_texture   xtlang


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

Implementation

(bind-func load_assim_material_texture
  (lambda (scene:aiScene* material type dir)
    (let ((texfile:aiString* (salloc))
          (tex:Texture* null))
      (if (= (aiGetMaterialTexture material type 0 texfile null null null null null null) 0)
          (let ((s1 (cast (tref-ptr texfile 1) i8*))
                (lgth (+ (strlen dir) (tref texfile 0) 1))
                (s2 (salloc lgth)))
            (if (= (pref s1 0) 42)
                (let ((texidx:i32 (atoi (pref-ptr s1 1)))
                      (texture:aiTexture* (pref (tref scene 9) texidx))
                      (achformat (tref texture 2))
                      (texwidth (tref texture 0))
                      (texheight (tref texture 1))
                      (texdata (cast (tref texture 3) i8*))
                      (datasize (if (= texheight 0) texwidth (* 4 texwidth texheight))))
                  ;;(printf "tidx:%d of num:%d w:%d h:%d size:%d\n" texidx (tref scene 8) texwidth texheight datasize)
                  (set! tex (Texture texwidth texheight 4 texdata))
                  (update tex)
                  ;; (bind tex #t) ;; send to card
                  ;; (unbind tex)
                  (println tex)
                  ;; (set! texid (ai_load_ogl_texture_from_buffer texdata datasize 0))
                  void)
                (begin
                  (memset s2 0 lgth)
                  (memcpy s2 dir (strlen dir))
                  (memcpy (pref-ptr s2 (strlen dir)) s1 (tref texfile 0))
                  (println 'load-texture-from-file: (Str s2))
                  (set! tex (Texture (Str s2)))
                  (update tex)
                  (println tex)
                  ;; (set! texid (ai_load_ogl_texture s2 0))
                  void))))
      tex)))


Back to Index

Similar Entries

  • FBO_color_texture    xtlang    /digego/extempore/tree/v0.8.9/libs/external/gl/gl-objects.xtm
  • FBO_create_with_textures    xtlang    /digego/extempore/tree/v0.8.9/libs/external/gl/gl-objects.xtm
  • FBO_depth_texture    xtlang    /digego/extempore/tree/v0.8.9/libs/external/gl/gl-objects.xtm
  • Texture    xtlang    /digego/extempore/tree/v0.8.9/libs/external/gl/gl-objects2.xtm
  • Texture    xtlang    /digego/extempore/tree/v0.8.9/libs/external/gl/gl-objects2.xtm
  • Texture    xtlang    /digego/extempore/tree/v0.8.9/libs/external/gl/gl-objects2.xtm
  • Texture    xtlang    /digego/extempore/tree/v0.8.9/libs/external/gl/gl-objects2.xtm
  • Texture    xtlang    /digego/extempore/tree/v0.8.9/libs/external/gl/gl-objects2.xtm
  • Texture    xtlang    /digego/extempore/tree/v0.8.9/libs/external/gl/gl-objects2.xtm
  • Texture_bind_data    xtlang    /digego/extempore/tree/v0.8.9/libs/external/gl/gl-objects.xtm
  • Texture_bind_data    xtlang    /digego/extempore/tree/v0.8.9/libs/external/gl/gl-objects.xtm
  • Texture_bind_image    xtlang    /digego/extempore/tree/v0.8.9/libs/external/gl/gl-objects.xtm
  • Texture_create    xtlang    /digego/extempore/tree/v0.8.9/libs/external/gl/gl-objects.xtm
  • Texture_create_FBO_depth_texture    xtlang    /digego/extempore/tree/v0.8.9/libs/external/gl/gl-objects.xtm
  • Texture_delete    xtlang    /digego/extempore/tree/v0.8.9/libs/external/gl/gl-objects.xtm
  • aiGetMaterialFloat    xtlang    /digego/extempore/tree/v0.8.9/libs/external/assimp.xtm
  • aiProcess_RemoveRedundantMaterials    scheme    /digego/extempore/tree/v0.8.9/libs/external/assimp.xtm
  • 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    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
  • create_texture_shader    xtlang    /digego/extempore/tree/v0.8.9/examples/external/shader-tutorials/texture.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
  • fbo_create_texture    xtlang    /digego/extempore/tree/v0.8.9/libs/external/opengl.xtm
  • fbo_create_texture_rect    xtlang    /digego/extempore/tree/v0.8.9/libs/external/opengl.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_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
  • 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
  • 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
  • set_slide_texture    xtlang    /digego/extempore/tree/v0.8.9/examples/contrib/slideshow.xtm
  • shader_update_material    xtlang    /digego/extempore/tree/v0.8.9/libs/external/graphics-pipeline.xtm
  • shader_update_material    xtlang    /digego/extempore/tree/v0.8.9/libs/external/graphics-pipeline.xtm
  • shader_update_material    xtlang    /digego/extempore/tree/v0.8.9/libs/external/graphics-pipeline.xtm
  • shader_update_projection_texture    xtlang    /digego/extempore/tree/v0.8.9/libs/external/graphics-pipeline.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
  • texture_setup    xtlang    /digego/extempore/tree/v0.8.9/examples/external/shader-tutorials/texture.xtm
  • world_texture_setup    xtlang    /digego/extempore/tree/v0.8.9/examples/contrib/game-of-life.xtm
  • xtm_load_vgimage    xtlang    /digego/extempore/tree/v0.8.9/libs/contrib/openvg.xtm
  • xtm_projection_texture_load    xtlang    /digego/extempore/tree/v0.8.9/libs/external/graphics-pipeline.xtm
  • xtm_projecton_texture_weight    xtlang    /digego/extempore/tree/v0.8.9/libs/external/graphics-pipeline.xtm