Texture_bind_image   xtlang


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

Implementation

(bind-func Texture_bind_image
  (lambda (tex:Texture filename)
    ;; seems to need to be set
    (stbi_set_flip_vertically_on_load 1)
    (let ((width_ptr:i32* (salloc))
          (height_ptr:i32* (salloc))
          (comp_ptr:i32* (salloc))
          (data (stbi_load filename width_ptr height_ptr comp_ptr 4)))
      (if (null? data)
          (begin (println (stbi_failure_reason))
                 -1)
          (begin
            (glActiveTexture GL_TEXTURE0)
            (glBindTexture GL_TEXTURE_2D tex)
            (glTexImage2D GL_TEXTURE_2D 0
                          GL_RGBA
                          (pref width_ptr 0)
                          (pref height_ptr 0)
                          0
                          GL_RGBA
                          GL_UNSIGNED_BYTE
                          data)
            ;; set some parameters
            (glTexParameteri GL_TEXTURE_2D GL_TEXTURE_WRAP_S GL_CLAMP_TO_EDGE)
            (glTexParameteri GL_TEXTURE_2D GL_TEXTURE_WRAP_T GL_CLAMP_TO_EDGE)
            (glTexParameteri GL_TEXTURE_2D GL_TEXTURE_MIN_FILTER GL_LINEAR)
            (glTexParameteri GL_TEXTURE_2D GL_TEXTURE_MAG_FILTER GL_LINEAR)
            (gl_print_error "couldn't Texture_bind_image")
            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_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
  • VAO_bind_and_draw_arrays    xtlang    /digego/extempore/tree/v0.8.9/libs/external/gl/gl-objects.xtm
  • VAO_bind_attribute    xtlang    /digego/extempore/tree/v0.8.9/libs/external/gl/gl-objects.xtm
  • VAO_bind_attribute    xtlang    /digego/extempore/tree/v0.8.9/libs/external/gl/gl-objects.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
  • biSizeImage    xtlang    /digego/extempore/tree/v0.8.9/libs/contrib/win32.xtm
  • bind    xtlang    /digego/extempore/tree/v0.8.9/libs/external/gl/gl-objects2.xtm
  • bind    xtlang    /digego/extempore/tree/v0.8.9/libs/external/gl/gl-objects2.xtm
  • bind    xtlang    /digego/extempore/tree/v0.8.9/libs/external/gl/gl-objects2.xtm
  • bind-alias    macro    /digego/extempore/tree/v0.8.9/runtime/llvmti.xtm
  • bind-closure    macro    /digego/extempore/tree/v0.8.9/runtime/llvmti.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
  • bind-dylib    macro    /digego/extempore/tree/v0.8.9/runtime/llvmti.xtm
  • bind-ext-val    macro    /digego/extempore/tree/v0.8.9/runtime/llvmti.xtm
  • bind-external-dylib-declarations    scheme    /digego/extempore/tree/v0.8.9/runtime/llvmti.xtm
  • bind-func    macro    /digego/extempore/tree/v0.8.9/runtime/llvmti.xtm
  • bind-func-ipc    scheme    /digego/extempore/tree/v0.8.9/runtime/llvmti.xtm
  • bind-gl-proc    macro    /digego/extempore/tree/v0.8.9/libs/external/gl/gl-getprocaddress.xtm
  • bind-glew    macro    /digego/extempore/tree/v0.8.9/libs/external/gl/glcore-glew.xtm
  • bind-lib    macro    /digego/extempore/tree/v0.8.9/runtime/llvmti.xtm
  • bind-lib-func    macro    /digego/extempore/tree/v0.8.9/runtime/llvmti.xtm
  • bind-lib-type    macro    /digego/extempore/tree/v0.8.9/runtime/llvmti.xtm
  • bind-lib-val    macro    /digego/extempore/tree/v0.8.9/runtime/llvmti.xtm
  • bind-lib-xtm-get-string    macro    /digego/extempore/tree/v0.8.9/runtime/llvmti.xtm
  • bind-macro    macro    /digego/extempore/tree/v0.8.9/runtime/llvmti.xtm
  • bind-method    macro    /digego/extempore/tree/v0.8.9/libs/core/xobject.xtm
  • bind-object    macro    /digego/extempore/tree/v0.8.9/libs/core/xobject.xtm
  • bind-poly    macro    /digego/extempore/tree/v0.8.9/runtime/llvmti.xtm
  • bind-static    macro    /digego/extempore/tree/v0.8.9/runtime/llvmti.xtm
  • bind-type    macro    /digego/extempore/tree/v0.8.9/runtime/llvmti.xtm
  • bind-val    macro    /digego/extempore/tree/v0.8.9/runtime/llvmti.xtm
  • bind-wrapper    macro    /digego/extempore/tree/v0.8.9/runtime/llvmti.xtm
  • bind_cube    xtlang    /digego/extempore/tree/v0.8.9/libs/external/gl/gl-objects2.xtm
  • bindfunc    xtlang    /digego/extempore/tree/v0.8.9/libs/contrib/aot-compilation.xtm
  • bindfunc_with_docstring    xtlang    /digego/extempore/tree/v0.8.9/libs/contrib/aot-compilation.xtm
  • bindfunc_with_zone_size    xtlang    /digego/extempore/tree/v0.8.9/libs/contrib/aot-compilation.xtm
  • bindfunc_with_zone_size_and_docstring    xtlang    /digego/extempore/tree/v0.8.9/libs/contrib/aot-compilation.xtm
  • cairo_draw_image    xtlang    /digego/extempore/tree/v0.8.9/examples/contrib/drawing.xtm
  • create_texture_shader    xtlang    /digego/extempore/tree/v0.8.9/examples/external/shader-tutorials/texture.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
  • 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
  • fits-image-x    xtlang    /digego/extempore/tree/v0.8.9/libs/contrib/fitslib.xtm
  • fits-image-x    xtlang    /digego/extempore/tree/v0.8.9/libs/contrib/fits.xtm
  • fits-image-y    xtlang    /digego/extempore/tree/v0.8.9/libs/contrib/fitslib.xtm
  • fits-image-y    xtlang    /digego/extempore/tree/v0.8.9/libs/contrib/fits.xtm
  • fits-image-z    xtlang    /digego/extempore/tree/v0.8.9/libs/contrib/fitslib.xtm
  • fits-image-z    xtlang    /digego/extempore/tree/v0.8.9/libs/contrib/fits.xtm
  • free_image    xtlang    /digego/extempore/tree/v0.8.9/libs/external/gl/gl-objects2.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
  • godot_method_bind_call    xtlang    /digego/extempore/tree/v0.8.9/libs/contrib/libgodot.xtm
  • godot_method_bind_get_method    xtlang    /digego/extempore/tree/v0.8.9/libs/contrib/libgodot.xtm
  • godot_method_bind_ptrcall    xtlang    /digego/extempore/tree/v0.8.9/libs/contrib/libgodot.xtm
  • impc:aot:insert-closure-binding-details    scheme    /digego/extempore/tree/v0.8.9/runtime/llvmti.xtm
  • impc:aot:insert-ext-globalvar-binding-details    scheme    /digego/extempore/tree/v0.8.9/runtime/llvmti.xtm
  • impc:aot:insert-gl-proc-binding-details    scheme    /digego/extempore/tree/v0.8.9/libs/external/gl/gl-getprocaddress.xtm
  • impc:aot:insert-globalvar-binding-details    scheme    /digego/extempore/tree/v0.8.9/runtime/llvmti.xtm
  • impc:aot:insert-namedtype-binding-details    scheme    /digego/extempore/tree/v0.8.9/runtime/llvmti.xtm
  • impc:aot:insert-nativefunc-binding-details    scheme    /digego/extempore/tree/v0.8.9/runtime/llvmti.xtm
  • impc:aot:insert-polyfunc-binding-details    scheme    /digego/extempore/tree/v0.8.9/runtime/llvmti.xtm
  • impc:aot:insert-static-binding-details    scheme    /digego/extempore/tree/v0.8.9/runtime/llvmti.xtm
  • impc:aot:insert-typealias-binding-details    scheme    /digego/extempore/tree/v0.8.9/runtime/llvmti.xtm
  • impc:aot:insert-xtmacro-binding-details    scheme    /digego/extempore/tree/v0.8.9/runtime/llvmti.xtm
  • impc:compiler:print-bind-func-details-to-log    scheme    /digego/extempore/tree/v0.8.9/runtime/llvmti.xtm
  • impc:compiler:print-binding-details-to-log    scheme    /digego/extempore/tree/v0.8.9/runtime/llvmti.xtm
  • impc:compiler:print-lib-binding-details-to-log    scheme    /digego/extempore/tree/v0.8.9/runtime/llvmti.xtm
  • impc:ti:bind-dylib    scheme    /digego/extempore/tree/v0.8.9/runtime/llvmti.xtm
  • impc:ti:bind-lib    scheme    /digego/extempore/tree/v0.8.9/runtime/llvmti.xtm
  • ipc:bind-func    scheme    /digego/extempore/tree/v0.8.9/runtime/llvmti.xtm
  • ipc:bind-xtmrender-vars    scheme    /digego/extempore/tree/v0.8.9/libs/external/graphics-pipeline-scm.xtm
  • load_assim_material_texture    xtlang    /digego/extempore/tree/v0.8.9/libs/external/assimp.xtm
  • match-result:bind    scheme    /digego/extempore/tree/v0.8.9/libs/base/pattern.xtm
  • nnsock_bind    xtlang    /digego/extempore/tree/v0.8.9/libs/external/nanomsg.xtm
  • plet-make-bindings    scheme    /digego/extempore/tree/v0.8.9/libs/base/pattern.xtm
  • set_slide_texture    xtlang    /digego/extempore/tree/v0.8.9/examples/contrib/slideshow.xtm
  • shader_update_projection_texture    xtlang    /digego/extempore/tree/v0.8.9/libs/external/graphics-pipeline.xtm
  • texture_setup    xtlang    /digego/extempore/tree/v0.8.9/examples/external/shader-tutorials/texture.xtm
  • unbind    xtlang    /digego/extempore/tree/v0.8.9/libs/external/gl/gl-objects2.xtm
  • unbind    xtlang    /digego/extempore/tree/v0.8.9/libs/external/gl/gl-objects2.xtm
  • unbind    xtlang    /digego/extempore/tree/v0.8.9/libs/external/gl/gl-objects2.xtm
  • unbind-func    macro    /digego/extempore/tree/v0.8.9/runtime/llvmti.xtm
  • unbind_cube    xtlang    /digego/extempore/tree/v0.8.9/libs/external/gl/gl-objects2.xtm
  • unbind_cube    xtlang    /digego/extempore/tree/v0.8.9/libs/external/gl/gl-objects2.xtm
  • world_texture_setup    xtlang    /digego/extempore/tree/v0.8.9/examples/contrib/game-of-life.xtm
  • xtm_create_vgimage    xtlang    /digego/extempore/tree/v0.8.9/libs/contrib/openvg.xtm
  • xtm_destroy_vgimage    xtlang    /digego/extempore/tree/v0.8.9/libs/contrib/openvg.xtm
  • xtm_draw_vgimage    xtlang    /digego/extempore/tree/v0.8.9/libs/contrib/openvg.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
  • xtm_scale_and_draw_vgimage    xtlang    /digego/extempore/tree/v0.8.9/libs/contrib/openvg.xtm
  • xtm_scale_and_draw_vgimaged    xtlang    /digego/extempore/tree/v0.8.9/libs/contrib/openvg.xtm
  • xtm_set_vgimage_subdata    xtlang    /digego/extempore/tree/v0.8.9/libs/contrib/openvg.xtm
  • xtm_vgimage_rotate    xtlang    /digego/extempore/tree/v0.8.9/libs/contrib/openvg.xtm
  • xtm_vgimage_rotated    xtlang    /digego/extempore/tree/v0.8.9/libs/contrib/openvg.xtm
  • xtm_vgimage_scale    xtlang    /digego/extempore/tree/v0.8.9/libs/contrib/openvg.xtm
  • xtm_vgimage_scaled    xtlang    /digego/extempore/tree/v0.8.9/libs/contrib/openvg.xtm
  • xtm_vgimage_shear    xtlang    /digego/extempore/tree/v0.8.9/libs/contrib/openvg.xtm
  • xtm_vgimage_sheard    xtlang    /digego/extempore/tree/v0.8.9/libs/contrib/openvg.xtm
  • xtm_vgimage_translate    xtlang    /digego/extempore/tree/v0.8.9/libs/contrib/openvg.xtm
  • xtm_vgimage_translated    xtlang    /digego/extempore/tree/v0.8.9/libs/contrib/openvg.xtm