update_cube   xtlang


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

Implementation

(bind-func update_cube
  (lambda (tex:Texture*)
    (glActiveTexture GL_TEXTURE0)
    (glBindTexture GL_TEXTURE_CUBE_MAP (id tex))
    (gl_print_error "error binding texture cube data")
    ;; front
    (glTexImage2D GL_TEXTURE_CUBE_MAP_POSITIVE_Z 0
                  (if (= (type tex) GL_BGRA) GL_RGBA (type tex)) ;; this is internal type
                  (width tex)
                  (height tex)
                  0
                  (type tex)        ;; this is external type (i.e. conversion from external to internal required)
                  GL_UNSIGNED_BYTE
                  (pref-ptr (data tex) (* (width tex) (height tex) 4 0)))
    ;; back
    (glTexImage2D GL_TEXTURE_CUBE_MAP_NEGATIVE_Z 0
                  (if (= (type tex) GL_BGRA) GL_RGBA (type tex)) ;; this is internal type
                  (width tex)
                  (height tex)
                  0
                  (type tex)        ;; this is external type (i.e. conversion from external to internal required)
                  GL_UNSIGNED_BYTE
                  (pref-ptr (data tex) (* (width tex) (height tex) 4 1)))
    ;; top
    (glTexImage2D GL_TEXTURE_CUBE_MAP_POSITIVE_Y 0
                  (if (= (type tex) GL_BGRA) GL_RGBA (type tex)) ;; this is internal type
                  (width tex)
                  (height tex)
                  0
                  (type tex)        ;; this is external type (i.e. conversion from external to internal required)
                  GL_UNSIGNED_BYTE
                  (pref-ptr (data tex) (* (width tex) (height tex) 4 2)))
    ;; bottom
    (glTexImage2D GL_TEXTURE_CUBE_MAP_NEGATIVE_Y 0
                  (if (= (type tex) GL_BGRA) GL_RGBA (type tex)) ;; this is internal type
                  (width tex)
                  (height tex)
                  0
                  (type tex)        ;; this is external type (i.e. conversion from external to internal required)
                  GL_UNSIGNED_BYTE
                  (pref-ptr (data tex) (* (width tex) (height tex) 4 3)))
    ;; left
    (glTexImage2D GL_TEXTURE_CUBE_MAP_POSITIVE_X 0
                  (if (= (type tex) GL_BGRA) GL_RGBA (type tex)) ;; this is internal type
                  (width tex)
                  (height tex)
                  0
                  (type tex)        ;; this is external type (i.e. conversion from external to internal required)
                  GL_UNSIGNED_BYTE
                  (pref-ptr (data tex) (* (width tex) (height tex) 4 4)))
    ;; right
    (glTexImage2D GL_TEXTURE_CUBE_MAP_NEGATIVE_X 0
                  (if (= (type tex) GL_BGRA) GL_RGBA (type tex)) ;; this is internal type
                  (width tex)
                  (height tex)
                  0
                  (type tex)        ;; this is external type (i.e. conversion from external to internal required)
                  GL_UNSIGNED_BYTE
                  (pref-ptr (data tex) (* (width tex) (height tex) 4 5)))
    (glBindTexture GL_TEXTURE_CUBE_MAP 0)
    (gl_print_error "could not update cube!")
    void))


Back to Index

Similar Entries

  • VBO_update_data    xtlang    /digego/extempore/tree/v0.8.9/libs/external/gl/gl-objects.xtm
  • bind_cube    xtlang    /digego/extempore/tree/v0.8.9/libs/external/gl/gl-objects2.xtm
  • clean-cube    xtlang    /digego/extempore/tree/v0.8.9/examples/contrib/fluid_dynamics.xtm
  • clock:update-metro    scheme    /digego/extempore/tree/v0.8.9/runtime/scheme.xtm
  • clock:update-metro    scheme    /digego/extempore/tree/v0.8.9/runtime/scheme.xtm
  • cube_whole    xtlang    /digego/extempore/tree/v0.8.9/libs/external/opengl.xtm
  • dict_update    xtlang    /digego/extempore/tree/v0.8.9/libs/core/adt.xtm
  • fluid-cube-add-density    xtlang    /digego/extempore/tree/v0.8.9/libs/external/fluid2d.xtm
  • fluid-cube-add-density    xtlang    /digego/extempore/tree/v0.8.9/examples/contrib/fluid_dynamics.xtm
  • fluid-cube-add-velocity    xtlang    /digego/extempore/tree/v0.8.9/libs/external/fluid2d.xtm
  • fluid-cube-add-velocity    xtlang    /digego/extempore/tree/v0.8.9/examples/contrib/fluid_dynamics.xtm
  • fluid-cube-create    xtlang    /digego/extempore/tree/v0.8.9/libs/external/fluid2d.xtm
  • fluid-cube-create    xtlang    /digego/extempore/tree/v0.8.9/examples/contrib/fluid_dynamics.xtm
  • fluid-cube-get-column    xtlang    /digego/extempore/tree/v0.8.9/libs/external/fluid2d.xtm
  • fluid-cube-get-first-column    xtlang    /digego/extempore/tree/v0.8.9/libs/external/fluid2d.xtm
  • fluid-cube-get-first-row    xtlang    /digego/extempore/tree/v0.8.9/libs/external/fluid2d.xtm
  • fluid-cube-get-last-column    xtlang    /digego/extempore/tree/v0.8.9/libs/external/fluid2d.xtm
  • fluid-cube-get-last-row    xtlang    /digego/extempore/tree/v0.8.9/libs/external/fluid2d.xtm
  • fluid-cube-get-row    xtlang    /digego/extempore/tree/v0.8.9/libs/external/fluid2d.xtm
  • fluid-cube-set-column    xtlang    /digego/extempore/tree/v0.8.9/libs/external/fluid2d.xtm
  • fluid-cube-set-first-column    xtlang    /digego/extempore/tree/v0.8.9/libs/external/fluid2d.xtm
  • fluid-cube-set-first-row    xtlang    /digego/extempore/tree/v0.8.9/libs/external/fluid2d.xtm
  • fluid-cube-set-last-column    xtlang    /digego/extempore/tree/v0.8.9/libs/external/fluid2d.xtm
  • fluid-cube-set-last-row    xtlang    /digego/extempore/tree/v0.8.9/libs/external/fluid2d.xtm
  • fluid-cube-set-row    xtlang    /digego/extempore/tree/v0.8.9/libs/external/fluid2d.xtm
  • fluid-step-cube    xtlang    /digego/extempore/tree/v0.8.9/libs/external/fluid2d.xtm
  • fluid-step-cube    xtlang    /digego/extempore/tree/v0.8.9/examples/contrib/fluid_dynamics.xtm
  • fluid_cube_add_density    xtlang    /digego/extempore/tree/v0.8.9/examples/contrib/fluids_2d.xtm
  • fluid_cube_add_velocity    xtlang    /digego/extempore/tree/v0.8.9/examples/contrib/fluids_2d.xtm
  • fluid_cube_create    xtlang    /digego/extempore/tree/v0.8.9/examples/contrib/fluids_2d.xtm
  • fluid_step_cube    xtlang    /digego/extempore/tree/v0.8.9/examples/contrib/fluids_2d.xtm
  • get-fluid-cube    xtlang    /digego/extempore/tree/v0.8.9/examples/contrib/fluid_dynamics.xtm
  • get-fluid-cube-1    xtlang    /digego/extempore/tree/v0.8.9/examples/contrib/kinect_fire.xtm
  • get-fluid-cube-2    xtlang    /digego/extempore/tree/v0.8.9/examples/contrib/kinect_fire.xtm
  • get_fluid_cube    xtlang    /digego/extempore/tree/v0.8.9/examples/contrib/fluids_2d.xtm
  • glCube    xtlang    /digego/extempore/tree/v0.8.9/examples/contrib/fluid_dynamics.xtm
  • impc:ti:check-to-update-generic-vars    scheme    /digego/extempore/tree/v0.8.9/runtime/llvmti.xtm
  • impc:ti:update-closure-name    scheme    /digego/extempore/tree/v0.8.9/runtime/llvmti.xtm
  • impc:ti:update-var    scheme    /digego/extempore/tree/v0.8.9/runtime/llvmti.xtm
  • kinect_update_body    xtlang    /digego/extempore/tree/v0.8.9/libs/contrib/kinect2.xtm
  • load_cube_data    xtlang    /digego/extempore/tree/v0.8.9/libs/external/gl/gl-objects2.xtm
  • model_update    xtlang    /digego/extempore/tree/v0.8.9/examples/contrib/horde3d_knight.xtm
  • position_update    xtlang    /digego/extempore/tree/v0.8.9/examples/external/shader-tutorials/particles.xtm
  • shader_update_bones    xtlang    /digego/extempore/tree/v0.8.9/libs/external/graphics-pipeline.xtm
  • shader_update_camera    xtlang    /digego/extempore/tree/v0.8.9/libs/external/graphics-pipeline.xtm
  • shader_update_envmap    xtlang    /digego/extempore/tree/v0.8.9/libs/external/graphics-pipeline.xtm
  • shader_update_light    xtlang    /digego/extempore/tree/v0.8.9/libs/external/graphics-pipeline.xtm
  • shader_update_lights    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_material    xtlang    /digego/extempore/tree/v0.8.9/libs/external/graphics-pipeline.xtm
  • shader_update_matrices    xtlang    /digego/extempore/tree/v0.8.9/libs/external/graphics-pipeline.xtm
  • shader_update_matrices_lv    xtlang    /digego/extempore/tree/v0.8.9/libs/external/graphics-pipeline.xtm
  • shader_update_matrices_lvs    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
  • shader_update_uvwmatrix    xtlang    /digego/extempore/tree/v0.8.9/libs/external/graphics-pipeline.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
  • update    xtlang    /digego/extempore/tree/v0.8.9/libs/external/gl/gl-objects2.xtm
  • update    xtlang    /digego/extempore/tree/v0.8.9/libs/external/gl/gl-objects2.xtm
  • update-borders    xtlang    /digego/extempore/tree/v0.8.9/examples/contrib/kinect_fire.xtm
  • update-fluid-sym-state    xtlang    /digego/extempore/tree/v0.8.9/examples/contrib/kinect_fire.xtm
  • update_data_points    xtlang    /digego/extempore/tree/v0.8.9/examples/contrib/fluids_2d.xtm
  • xtm_update_camera    xtlang    /digego/extempore/tree/v0.8.9/libs/external/graphics-pipeline.xtm
  • xtm_update_lights    xtlang    /digego/extempore/tree/v0.8.9/libs/external/graphics-pipeline.xtm
  • xtm_update_matrices    xtlang    /digego/extempore/tree/v0.8.9/libs/external/graphics-pipeline.xtm
  • xtmtest-update-test-result    scheme    /digego/extempore/tree/v0.8.9/runtime/scheme.xtm
  • xtmtest-update-test-result    scheme    /digego/extempore/tree/v0.8.9/libs/core/test.xtm