load_data   xtlang


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

Implementation

(bind-func load_data
  (lambda (tex:Texture* flipped:i32 filename:String*)
    ;; (println "LOAD:" filename)
    ;; seems to need to be set
    (stbi_set_flip_vertically_on_load flipped)
    (let ((width_ptr:i32* (tref-ptr tex 2))
          (height_ptr:i32* (tref-ptr tex 3))
          (comp_ptr:i32* (salloc))
          (data (stbi_load (cstring filename) width_ptr height_ptr comp_ptr 4)))
      (cond ((= (pref comp_ptr 0) 4)
             (tset! tex 1 GL_RGBA))
            ((= (pref comp_ptr 0) 3)
             (tset! tex 1 GL_RGBA)) ;; rgb should be converted to RGBA
            ((= (pref comp_ptr 0) 1)
             (tset! tex 1 GL_DEPTH_COMPONENT))
            (else (println "Unknown componenet depth: " (pref comp_ptr 0)) 1:i32))
      (if (null? data)
          (begin
            (println (stbi_failure_reason)) 1)
          (begin
            (tset! tex 4 data) 1))
      void)))


Back to Index

Similar Entries

  • AudioBuffer_data_b64    xtlang    /digego/extempore/tree/v0.8.9/libs/core/audiobuffer.xtm
  • AudioBuffer_data_b64_cstring    xtlang    /digego/extempore/tree/v0.8.9/libs/core/audiobuffer.xtm
  • AudioBuffer_set_data_b64    xtlang    /digego/extempore/tree/v0.8.9/libs/core/audiobuffer.xtm
  • AudioBuffer_shared_data    xtlang    /digego/extempore/tree/v0.8.9/libs/core/audiobuffer.xtm
  • Pm_Event_Data1    xtlang    /digego/extempore/tree/v0.8.9/libs/external/portmidi.xtm
  • Pm_Event_Data2    xtlang    /digego/extempore/tree/v0.8.9/libs/external/portmidi.xtm
  • Pm_Message_Data1    xtlang    /digego/extempore/tree/v0.8.9/libs/external/portmidi.xtm
  • Pm_Message_Data2    xtlang    /digego/extempore/tree/v0.8.9/libs/external/portmidi.xtm
  • QRcode_data    xtlang    /digego/extempore/tree/v0.8.9/libs/external/qr-code.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
  • VBO_data    xtlang    /digego/extempore/tree/v0.8.9/libs/external/gl/gl-objects.xtm
  • VBO_update_data    xtlang    /digego/extempore/tree/v0.8.9/libs/external/gl/gl-objects.xtm
  • aiProcess_FindInvalidData    scheme    /digego/extempore/tree/v0.8.9/libs/external/assimp.xtm
  • aiProcess_ValidateDataStructure    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
  • bind-data    macro    /digego/extempore/tree/v0.8.9/libs/base/adt.xtm
  • bind-data-constructors    scheme    /digego/extempore/tree/v0.8.9/libs/base/adt.xtm
  • bind-data-deconstructors    scheme    /digego/extempore/tree/v0.8.9/libs/base/adt.xtm
  • bind-data-deconstructors-macros    scheme    /digego/extempore/tree/v0.8.9/libs/base/adt.xtm
  • bind-data-getters    scheme    /digego/extempore/tree/v0.8.9/libs/base/adt.xtm
  • bind-data-type    scheme    /digego/extempore/tree/v0.8.9/libs/base/adt.xtm
  • bind-data-type-constructor    scheme    /digego/extempore/tree/v0.8.9/libs/base/adt.xtm
  • bind-data-types    scheme    /digego/extempore/tree/v0.8.9/libs/base/adt.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
  • clear_sample_data_    xtlang    /digego/extempore/tree/v0.8.9/libs/external/instruments_ext.xtm
  • create_data    xtlang    /digego/extempore/tree/v0.8.9/libs/external/gl/gl-objects2.xtm
  • data    xtlang    /digego/extempore/tree/v0.8.9/libs/external/gl/gl-objects2.xtm
  • data    xtlang    /digego/extempore/tree/v0.8.9/libs/external/gl/gl-objects2.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
  • fits-image-data-R32    xtlang    /digego/extempore/tree/v0.8.9/libs/contrib/fitslib.xtm
  • fits-image-data-R32    xtlang    /digego/extempore/tree/v0.8.9/libs/contrib/fits.xtm
  • fits-image-data-RGBA32    xtlang    /digego/extempore/tree/v0.8.9/libs/contrib/fitslib.xtm
  • fits-image-data-RGBA32    xtlang    /digego/extempore/tree/v0.8.9/libs/contrib/fits.xtm
  • fits-image-data-RGBA32-false    xtlang    /digego/extempore/tree/v0.8.9/libs/contrib/fitslib.xtm
  • fits-image-data-RGBA32-false    xtlang    /digego/extempore/tree/v0.8.9/libs/contrib/fits.xtm
  • get_download_handler    xtlang    /digego/extempore/tree/v0.8.9/libs/external/cef/cef.xtm
  • get_hand_data    xtlang    /digego/extempore/tree/v0.8.9/examples/contrib/orbbec_test.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
  • impc:ti:compile-type-dataconstructors    scheme    /digego/extempore/tree/v0.8.9/runtime/llvmti.xtm
  • init_sample_data    xtlang    /digego/extempore/tree/v0.8.9/examples/contrib/gstvideo_multi.xtm
  • init_sample_data    xtlang    /digego/extempore/tree/v0.8.9/examples/contrib/gstvideo.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_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
  • ocv_dataPtr    xtlang    /digego/extempore/tree/v0.8.9/libs/contrib/xtmcv.xtm
  • ocv_dataPtr    xtlang    /digego/extempore/tree/v0.8.9/libs/contrib/xtmcv.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-data-arrays-lines    xtlang    /digego/extempore/tree/v0.8.9/examples/contrib/kinect_fire.xtm
  • set-data-arrays-points    xtlang    /digego/extempore/tree/v0.8.9/examples/contrib/kinect_fire.xtm
  • set-data-particles    xtlang    /digego/extempore/tree/v0.8.9/examples/contrib/kinect_fire.xtm
  • set_sample_data_    xtlang    /digego/extempore/tree/v0.8.9/libs/external/instruments_ext.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
  • sys_file_datasync    xtlang    /digego/extempore/tree/v0.8.9/libs/external/system.xtm
  • sys_file_datasync    xtlang    /digego/extempore/tree/v0.8.9/libs/external/system.xtm
  • update_data_points    xtlang    /digego/extempore/tree/v0.8.9/examples/contrib/fluids_2d.xtm
  • world_data    xtlang    /digego/extempore/tree/v0.8.9/libs/contrib/game-of-life.xtm
  • world_data_index    xtlang    /digego/extempore/tree/v0.8.9/libs/contrib/game-of-life.xtm
  • world_data_size    xtlang    /digego/extempore/tree/v0.8.9/libs/contrib/game-of-life.xtm
  • xobj_database    xtlang    /digego/extempore/tree/v0.8.9/libs/core/xobject.xtm
  • xtm_frame_data_to_tex    xtlang    /digego/extempore/tree/v0.8.9/examples/contrib/gstvideo.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_set_vgimage_subdata    xtlang    /digego/extempore/tree/v0.8.9/libs/contrib/openvg.xtm