create_shader   xtlang


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

Implementation

;; load shader (vert and frag shader)
(bind-func create_shader
  (lambda (vsource:i8* fsource:i8*)
    (let ((fshader (glCreateShader GL_FRAGMENT_SHADER))
          (vshader (glCreateShader GL_VERTEX_SHADER))
          (fcode:|1,i8*|* (salloc 1))
          (vcode:|1,i8*|* (salloc 1))
          (program (glCreateProgram))
          (temp:i32* (salloc 1)))
      (pset! fcode 0 fsource)
      (pset! vcode 0 vsource)
      (glShaderSource fshader 1 (cast fcode i8**) (bitcast null i32*))
      (glShaderSource vshader 1 (cast vcode i8**) (bitcast null i32*))
      (glCompileShader fshader)
      (glCompileShader vshader)
      (glAttachShader program fshader)
      (glAttachShader program vshader)
      (glLinkProgram program)
      (print_shader_info_log fshader)
      (print_shader_info_log vshader)
      (print_program_info_log program)
      program)))


Back to Index

Similar Entries

  • FBO_create    xtlang
  • FBO_create_with_textures    xtlang
  • Shader    xtlang
  • ShaderProgram    xtlang
  • ShaderProgram    xtlang
  • ShaderProgram    xtlang
  • ShaderProgram    xtlang
  • ShaderProgram_create    xtlang
  • ShaderProgram_create    xtlang
  • ShaderProgram_create    xtlang
  • ShaderProgram_create    xtlang
  • ShaderProgram_print_info_log    xtlang
  • Shader_create    xtlang
  • Shader_id    xtlang
  • Shader_print_info_log    xtlang
  • Shader_type    xtlang
  • Texture_create    xtlang
  • Texture_create_FBO_depth_texture    xtlang
  • VAO_create    xtlang
  • VAO_create_ss_quad    xtlang
  • VBO_create    xtlang
  • VBO_create    xtlang
  • VBO_create    xtlang
  • VBO_create    xtlang
  • apr_pool_create    xtlang
  • apr_pool_create    xtlang
  • cerberus_create_lfos    xtlang
  • create-zone    scheme
  • create-zone1    xtlang
  • create-zone2    xtlang
  • create_arrows_shader    xtlang
  • create_data    xtlang
  • create_fbo    xtlang
  • create_fbo_no_depth    xtlang
  • create_fbo_no_depth_rect    xtlang
  • create_fbo_rect    xtlang
  • create_heatmap_shader    xtlang
  • create_particles_shader    xtlang
  • create_points_shader    xtlang
  • create_post_process_shader    xtlang
  • create_raymarcher_shader    xtlang
  • create_shader_xtm    xtlang
  • create_shadertoy_shader    xtlang
  • create_texture_shader    xtlang
  • create_triangle_shader    xtlang
  • create_triangle_shader    xtlang
  • create_vbo    xtlang
  • create_walker_array    xtlang
  • fbo_create_depth_buffer    xtlang
  • fbo_create_depth_buffer_rect    xtlang
  • fbo_create_texture    xtlang
  • fbo_create_texture_rect    xtlang
  • fluid-cube-create    xtlang
  • fluid-cube-create    xtlang
  • fluid_cube_create    xtlang
  • fragshader    scheme
  • glfw_create_fullscreen_interaction_window    xtlang
  • glfw_create_fullscreen_interaction_window    xtlang
  • glfw_create_fullscreen_window    xtlang
  • glfw_create_fullscreen_window    xtlang
  • glfw_create_interaction_window    xtlang
  • glfw_create_window    xtlang
  • glfw_init_and_create_compatibility_window    xtlang
  • glfw_init_and_create_fullscreen_compatibility_window    xtlang
  • glfw_init_and_create_fullscreen_interaction_compatibility_window    xtlang
  • glfw_init_and_create_fullscreen_interaction_window    xtlang
  • glfw_init_and_create_fullscreen_interaction_window    xtlang
  • glfw_init_and_create_fullscreen_window    xtlang
  • glfw_init_and_create_fullscreen_window    xtlang
  • glfw_init_and_create_interaction_compatibility_window    xtlang
  • glfw_init_and_create_interaction_window    xtlang
  • glfw_init_and_create_window    xtlang
  • impc:ir:compile:create_zone    scheme
  • impc:ti:create-scheme-wrapper    scheme
  • impc:ti:create-scm-wrapper?    scheme
  • impc:ti:create_zone-check    scheme
  • nnsock_create    xtlang
  • nnsock_create    xtlang
  • nvg_create_context    xtlang
  • nvg_create_font    xtlang
  • pa_create_default_stream    xtlang
  • pa_create_stream    xtlang
  • pm_create_input_stream    xtlang
  • pm_create_output_stream    xtlang
  • print_shader_info_log    xtlang
  • psystem_create    xtlang
  • psystem_create    xtlang
  • qr_create_l    xtlang
  • qr_create_with_level    xtlang
  • rados-pool-create    xtlang
  • shader_prepare_draw    xtlang
  • shader_prepare_draw    xtlang
  • shader_prepare_draw    xtlang
  • shader_prepare_draw    xtlang
  • shader_prepare_draw    xtlang
  • shader_set_grid_offsets    xtlang
  • shader_setup_convolution_filter    xtlang
  • shader_update_bones    xtlang
  • shader_update_camera    xtlang
  • shader_update_envmap    xtlang
  • shader_update_light    xtlang
  • shader_update_lights    xtlang
  • shader_update_material    xtlang
  • shader_update_material    xtlang
  • shader_update_material    xtlang
  • shader_update_matrices    xtlang
  • shader_update_matrices_lv    xtlang
  • shader_update_matrices_lvs    xtlang
  • shader_update_projection_texture    xtlang
  • shader_update_uvwmatrix    xtlang
  • shadertoy-loop    scheme
  • vertshader    scheme
  • world_create    xtlang
  • xtm-vg-create-context    scheme
  • xtm_create_path    xtlang
  • xtm_create_vgimage    xtlang
  • xtm_render_init_dof_shader    xtlang
  • xtm_render_init_light_shader    xtlang
  • xtm_render_init_quad_shader    xtlang
  • xtm_render_init_simple_bone_shader    xtlang
  • xtm_render_init_simple_shader    xtlang
  • xtm_render_init_skybox_shader    xtlang
  • xtm_vg_create_contextf    xtlang
  • xtm_vg_create_contexti32    xtlang