FBO_create_with_textures   xtlang


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

Implementation

(bind-func FBO_create_with_textures
  (lambda (width height depth_p:i1)
    (let ((fbo (FBO_create))
          (color_tex (Texture_create))
          (depth_tex -1))
      (glBindTexture GL_TEXTURE_2D color_tex)
      (glTexImage2D GL_TEXTURE_2D 0 GL_RGBA width height 0 GL_RGBA GL_UNSIGNED_BYTE null)
      (glTexParameteri GL_TEXTURE_2D GL_TEXTURE_WRAP_S GL_REPEAT)
      (glTexParameteri GL_TEXTURE_2D GL_TEXTURE_WRAP_T GL_REPEAT)
      (glTexParameteri GL_TEXTURE_2D GL_TEXTURE_MIN_FILTER GL_NEAREST)
      (glTexParameteri GL_TEXTURE_2D GL_TEXTURE_MAG_FILTER GL_NEAREST)
      (glBindFramebuffer GL_FRAMEBUFFER (FBO_id fbo))
      (glFramebufferTexture2D GL_FRAMEBUFFER GL_COLOR_ATTACHMENT0 GL_TEXTURE_2D color_tex 0)
      (if depth_p
          (set! depth_tex (Texture_create_FBO_depth_texture width height)))
      (if (<> (glCheckFramebufferStatus GL_FRAMEBUFFER) GL_FRAMEBUFFER_COMPLETE)
          (begin
            (println "Error creating framebuffer")
            (gl_print_error "Error creating FBO & backing textures")
            ;; return null pointer for fbo
            null)
          ;; fill the FBO tuple with metadata
          (begin
            (tfill! fbo
                    (FBO_id fbo)
                    color_tex
                    depth_tex
                    width
                    height)
            ;; unbind the frame buffer
            (glBindFramebuffer GL_FRAMEBUFFER 0)
            fbo)))))


Back to Index

Similar Entries

  • FBO    xtlang
  • FBO    xtlang
  • FBO    xtlang
  • FBO    xtlang
  • FBO    xtlang
  • FBO_color_texture    xtlang
  • FBO_create    xtlang
  • FBO_depth_texture    xtlang
  • FBO_height    xtlang
  • FBO_id    xtlang
  • FBO_width    xtlang
  • ShaderProgram_create    xtlang
  • ShaderProgram_create    xtlang
  • ShaderProgram_create    xtlang
  • ShaderProgram_create    xtlang
  • Shader_create    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
  • Widget_with_cb    xtlang
  • apr_pool_create    xtlang
  • apr_pool_create    xtlang
  • bindfunc_with_docstring    xtlang
  • bindfunc_with_zone_size    xtlang
  • bindfunc_with_zone_size_and_docstring    xtlang
  • call-with-input-file    scheme
  • call-with-output-file    scheme
  • 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    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
  • curl_request_with_auth    xtlang
  • curl_request_with_header    xtlang
  • define-with-return    macro
  • draw_color_body_frame_with_hands    xtlang
  • fbo_create_depth_buffer    xtlang
  • fbo_create_depth_buffer_rect    xtlang
  • fbo_create_texture    xtlang
  • fbo_create_texture_rect    xtlang
  • fill_buffer_with_file    xtlang
  • fluid-cube-create    xtlang
  • fluid-cube-create    xtlang
  • fluid_cube_create    xtlang
  • get-fbo    xtlang
  • get-fbo    xtlang
  • ghttp_perform_request_with_setup_fn    xtlang
  • gl_load_movie_textures    xtlang
  • gl_load_movie_textures    xtlang
  • gl_print_error_with_msg    xtlang
  • 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
  • gui_find_widget_with_id    xtlang
  • impc:compiler:print-bad-type-error-with-ast    scheme
  • impc:ir:compile:create_zone    scheme
  • impc:ir:compiler:heap-alloc-with-size    scheme
  • impc:ir:compiler:heap-alloc-without-size    scheme
  • impc:ir:compiler:stack-alloc-with-size    scheme
  • impc:ir:compiler:stack-alloc-without-size    scheme
  • impc:ir:compiler:zone-alloc-with-size    scheme
  • impc:ir:compiler:zone-alloc-without-size    scheme
  • impc:ti:create-scheme-wrapper    scheme
  • impc:ti:create-scm-wrapper?    scheme
  • impc:ti:create_zone-check    scheme
  • impc:ti:initialize-closure-with-new-zone    scheme
  • ipc:proc-name-with-mapping    scheme
  • make-list-with-proc    scheme
  • make-vector-with-proc    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
  • pm_device_with_id    xtlang
  • pm_input_device_with_name    xtlang
  • pm_output_device_with_name    xtlang
  • print-with-colors    macro
  • psystem_create    xtlang
  • psystem_create    xtlang
  • qr_create_l    xtlang
  • qr_create_with_level    xtlang
  • rados-pool-create    xtlang
  • return_ptr_gv_first_with_docstring    xtlang
  • return_ptr_gv_second_with_docstring    xtlang
  • set_cairo_source_with_colour    xtlang
  • sys:with-noisy-compiler    macro
  • sys:with-quiet-compiler    macro
  • thread_native_call_with_zone    xtlang
  • unzip1-with-cdr    scheme
  • unzip1-with-cdr-iterative    scheme
  • with-input-from-file    scheme
  • with-input-output-from-to-files    scheme
  • with-output-to-file    scheme
  • world_create    xtlang
  • xtm-vg-create-context    scheme
  • xtm_create_path    xtlang
  • xtm_create_vgimage    xtlang
  • xtm_render_fbo    xtlang
  • xtm_shadow_fbo    xtlang
  • xtm_vg_create_contextf    xtlang
  • xtm_vg_create_contexti32    xtlang
  • xtmtest-with-fixture    macro
  • xtmtest-with-fixture-body    scheme
  • xtmtest-with-fixture-body    scheme