draw_frame   xtlang


Defined in:  https://github.com/digego/extempore/tree/v0.8.9/examples/contrib/chipmunk-simple.xtm

Implementation

(bind-func draw_frame
  (let (
      (fill (NVGcolor 1.0 0.0 0.0 1.0))
      (stroke (NVGcolor 1.0 1.0 1.0 0.5))
      (rad (cpCircleShapeGetRadius ballShape)))
    (lambda (delta_t:double)
      (let ((pos (cpBodyGetPosition ballBody)))
        (nvgBeginFrame vg (convert width) (convert height) pixel_ratio)
        (nvgTransform vg (/ width (/ 200. pixel_ratio)) 0. 0. (/ height -200.) (/ width 2.) (* 3. (/ height 4.)))
        (nvgStrokeColor vg stroke)
        (nvgFillColor vg fill)
        (nvgStrokeWidth vg 0.25)
        (nvgBeginPath vg)
        (nvgCircle vg (convert (tref pos 0)) (convert (tref pos 1)) (convert rad))
        (draw_seg wall)
        (draw_seg ground)
        (nvgStroke vg)
        (nvgFill vg)
        (nvgEndFrame vg)
        (if (or
            (< (cpvlengthsq (cpBodyGetVelocity ballBody)) 0.1)
            (< (tref pos 1) -100.))
          (begin
            (cpBodySetPosition ballBody (cpVect_val (* (imp_randd) 50.) 100.))
            (cpBodySetVelocity ballBody (cpVect_val (* (- (imp_randd) 0.5) 5.) 0.))))
        (cpSpaceStep space delta_t)))))


Back to Index

Similar Entries

  • VAO_bind_and_draw_arrays    xtlang
  • cairo_draw_image    xtlang
  • draw    xtlang
  • draw    xtlang
  • draw-skeleton    xtlang
  • draw_a_circle    xtlang
  • draw_a_circle    xtlang
  • draw_a_line    xtlang
  • draw_a_line    xtlang
  • draw_barplot    xtlang
  • draw_color_body_frame    xtlang
  • draw_color_body_frame_with_hands    xtlang
  • draw_frame    xtlang
  • draw_frame    xtlang
  • draw_quad    xtlang
  • draw_rgb_frame    xtlang
  • draw_scatterplot    xtlang
  • draw_scene    xtlang
  • draw_seg    xtlang
  • draw_spectral_bar    xtlang
  • draw_spectrum_key    xtlang
  • dv_draw_axes_2D    xtlang
  • dv_draw_axis_labels_2D    xtlang
  • dv_draw_bars    xtlang
  • dv_draw_line    xtlang
  • dv_draw_line_segments    xtlang
  • dv_draw_scatter_points    xtlang
  • dv_draw_scatter_points    xtlang
  • dv_draw_title    xtlang
  • get_focused_frame    xtlang
  • get_frame    xtlang
  • get_frame_byident    xtlang
  • get_frame_count    xtlang
  • get_frame_identifiers    xtlang
  • get_frame_names    xtlang
  • get_main_frame    xtlang
  • gl-draw    xtlang
  • gl_draw    xtlang
  • gl_draw    xtlang
  • gl_draw    xtlang
  • gl_draw    xtlang
  • gl_draw    xtlang
  • gl_draw    xtlang
  • gl_draw    xtlang
  • gl_draw    xtlang
  • gl_draw    xtlang
  • gl_draw    xtlang
  • gl_draw    xtlang
  • gl_draw_arrows    xtlang
  • gl_draw_loop    xtlang
  • gl_draw_loop    xtlang
  • gl_draw_loop    xtlang
  • gl_draw_loop    xtlang
  • gl_draw_loop    xtlang
  • gl_draw_loop    xtlang
  • gl_draw_loop    xtlang
  • gl_draw_loop    xtlang
  • gl_draw_loop    xtlang
  • gl_draw_loop    xtlang
  • gl_draw_loop    xtlang
  • gl_draw_loop    xtlang
  • gl_draw_loop    xtlang
  • gl_draw_loop    xtlang
  • gl_draw_particles    xtlang
  • glfw_get_framebuffer_height    xtlang
  • glfw_get_framebuffer_width    xtlang
  • gui_draw_circle    xtlang
  • gui_draw_rect    xtlang
  • gui_draw_text_in_bounds    xtlang
  • init_draw_quad    xtlang
  • nvg_draw_loop    xtlang
  • nvg_draw_loop    xtlang
  • nvg_draw_loop    xtlang
  • nvg_draw_loop    xtlang
  • nvg_draw_text    xtlang
  • psystem_draw    xtlang
  • psystem_draw    xtlang
  • read_and_write_frame    xtlang
  • sf_frames    xtlang
  • sf_frames_from_file    xtlang
  • sf_set_frames    xtlang
  • shader_prepare_draw    xtlang
  • shader_prepare_draw    xtlang
  • shader_prepare_draw    xtlang
  • shader_prepare_draw    xtlang
  • shader_prepare_draw    xtlang
  • store_frame_OLA    xtlang
  • store_frame_PV    xtlang
  • store_frame_iPL    xtlang
  • store_frame_sPL    xtlang
  • vcframe    scheme
  • xtm_draw_arc    xtlang
  • xtm_draw_arc_fill    xtlang
  • xtm_draw_arc_fill    xtlang
  • xtm_draw_arc_fill    xtlang
  • xtm_draw_arc_fill    xtlang
  • xtm_draw_arc_fill    xtlang
  • xtm_draw_arc_fill    xtlang
  • xtm_draw_arc_fill    xtlang
  • xtm_draw_arc_fill    xtlang
  • xtm_draw_arc_stroke    xtlang
  • xtm_draw_arc_stroke    xtlang
  • xtm_draw_arc_stroke    xtlang
  • xtm_draw_arc_stroke    xtlang
  • xtm_draw_arc_stroke    xtlang
  • xtm_draw_arc_stroke    xtlang
  • xtm_draw_arc_stroke    xtlang
  • xtm_draw_arc_stroke    xtlang
  • xtm_draw_arcd    xtlang
  • xtm_draw_bezier_fill    xtlang
  • xtm_draw_bezier_fill    xtlang
  • xtm_draw_bezier_fill    xtlang
  • xtm_draw_bezier_fill    xtlang
  • xtm_draw_bezier_stroke    xtlang
  • xtm_draw_bezier_stroke    xtlang
  • xtm_draw_bezier_stroke    xtlang
  • xtm_draw_bezier_stroke    xtlang
  • xtm_draw_circle_fill    xtlang
  • xtm_draw_circle_fill    xtlang
  • xtm_draw_circle_fill    xtlang
  • xtm_draw_circle_fill    xtlang
  • xtm_draw_circle_stroke    xtlang
  • xtm_draw_circle_stroke    xtlang
  • xtm_draw_circle_stroke    xtlang
  • xtm_draw_circle_stroke    xtlang
  • xtm_draw_ellipse    xtlang
  • xtm_draw_ellipse_fill    xtlang
  • xtm_draw_ellipse_fill    xtlang
  • xtm_draw_ellipse_fill    xtlang
  • xtm_draw_ellipse_fill    xtlang
  • xtm_draw_ellipse_stroke    xtlang
  • xtm_draw_ellipse_stroke    xtlang
  • xtm_draw_ellipse_stroke    xtlang
  • xtm_draw_ellipse_stroke    xtlang
  • xtm_draw_ellipsed    xtlang
  • xtm_draw_line    xtlang
  • xtm_draw_line    xtlang
  • xtm_draw_line    xtlang
  • xtm_draw_line    xtlang
  • xtm_draw_line    xtlang
  • xtm_draw_lined    xtlang
  • xtm_draw_mesh    xtlang
  • xtm_draw_mesh    xtlang
  • xtm_draw_model    xtlang
  • xtm_draw_model    xtlang
  • xtm_draw_path    xtlang
  • xtm_draw_path_keep    xtlang
  • xtm_draw_poly    xtlang
  • xtm_draw_polyd    xtlang
  • xtm_draw_quad    xtlang
  • xtm_draw_quad_fill    xtlang
  • xtm_draw_quad_fill    xtlang
  • xtm_draw_quad_fill    xtlang
  • xtm_draw_quad_fill    xtlang
  • xtm_draw_quad_stroke    xtlang
  • xtm_draw_quad_stroke    xtlang
  • xtm_draw_quad_stroke    xtlang
  • xtm_draw_quad_stroke    xtlang
  • xtm_draw_quadd    xtlang
  • xtm_draw_rect    xtlang
  • xtm_draw_rect_fill    xtlang
  • xtm_draw_rect_fill    xtlang
  • xtm_draw_rect_fill    xtlang
  • xtm_draw_rect_fill    xtlang
  • xtm_draw_rect_stroke    xtlang
  • xtm_draw_rect_stroke    xtlang
  • xtm_draw_rect_stroke    xtlang
  • xtm_draw_rect_stroke    xtlang
  • xtm_draw_rectd    xtlang
  • xtm_draw_round_rect    xtlang
  • xtm_draw_round_rectd    xtlang
  • xtm_draw_rounded_rect_fill    xtlang
  • xtm_draw_rounded_rect_fill    xtlang
  • xtm_draw_rounded_rect_fill    xtlang
  • xtm_draw_rounded_rect_fill    xtlang
  • xtm_draw_rounded_rect_stroke    xtlang
  • xtm_draw_rounded_rect_stroke    xtlang
  • xtm_draw_rounded_rect_stroke    xtlang
  • xtm_draw_rounded_rect_stroke    xtlang
  • xtm_draw_rounded_rect_varying_fill    xtlang
  • xtm_draw_rounded_rect_varying_fill    xtlang
  • xtm_draw_rounded_rect_varying_fill    xtlang
  • xtm_draw_rounded_rect_varying_fill    xtlang
  • xtm_draw_rounded_rect_varying_stroke    xtlang
  • xtm_draw_rounded_rect_varying_stroke    xtlang
  • xtm_draw_rounded_rect_varying_stroke    xtlang
  • xtm_draw_rounded_rect_varying_stroke    xtlang
  • xtm_draw_tex    xtlang
  • xtm_draw_tex    xtlang
  • xtm_draw_tex    xtlang
  • xtm_draw_tex    xtlang
  • xtm_draw_tex    xtlang
  • xtm_draw_tex    xtlang
  • xtm_draw_tex    xtlang
  • xtm_draw_tri    xtlang
  • xtm_draw_tri_fill    xtlang
  • xtm_draw_tri_fill    xtlang
  • xtm_draw_tri_fill    xtlang
  • xtm_draw_tri_fill    xtlang
  • xtm_draw_tri_stroke    xtlang
  • xtm_draw_tri_stroke    xtlang
  • xtm_draw_tri_stroke    xtlang
  • xtm_draw_tri_stroke    xtlang
  • xtm_draw_trid    xtlang
  • xtm_draw_vao    xtlang
  • xtm_draw_vao    xtlang
  • xtm_draw_vgimage    xtlang
  • xtm_frame_data_to_tex    xtlang
  • xtm_scale_and_draw_vgimage    xtlang
  • xtm_scale_and_draw_vgimaged    xtlang