def buffer(buf_width = width, buf_height = height, renderer = @render_mode)
      create_graphics(buf_width, buf_height, renderer).tap do |buffer|
        buffer.begin_draw
        yield buffer
        buffer.end_draw
      end
    end
def buffer(buf_width = width, buf_height = height, renderer = @render_mode)
      create_graphics(buf_width, buf_height, renderer).tap do |buffer|
        buffer.begin_draw
        yield buffer
        buffer.end_draw
      end
    end
Nice block method to draw to a buffer.
 You can optionally pass it a width, a height, and a renderer.
 Takes care of starting and ending the draw for you.