|
Blender V5.0
|
#include <sequencer_quads_batch.hh>
Public Member Functions | |
| SeqQuadsBatch () | |
| ~SeqQuadsBatch () | |
| void | draw () |
| void | add_quad (float x1, float y1, float x2, float y2, const uchar color[4]) |
| void | add_quad (float x1, float y1, float x2, float y2, float x3, float y3, float x4, float y4, const uchar color[4]) |
| void | add_quad (float x1, float y1, float x2, float y2, float x3, float y3, float x4, float y4, const uchar color1[4], const uchar color2[4], const uchar color3[4], const uchar color4[4]) |
| void | add_wire_quad (float x1, float y1, float x2, float y2, const uchar color[4]) |
| void | add_line (float x1, float y1, float x2, float y2, const uchar color[4]) |
| void | add_line (float x1, float y1, float x2, float y2, const uchar color1[4], const uchar color2[4]) |
Flat-colored 2D geometry draw batching utility.
Internally uses GPU_SHADER_3D_FLAT_COLOR to draw single-colored rectangles, quads or lines. After adding a number of primitives with add_quad, add_wire_quad, add_line, draw them using draw. Note that draw can be called behind the scenes if number of primitives is larger than the internal batch buffer size.
Definition at line 31 of file sequencer_quads_batch.hh.
| blender::ed::vse::SeqQuadsBatch::SeqQuadsBatch | ( | ) |
Definition at line 41 of file sequencer_quads_batch.cc.
References blender::ed::vse::create_quads_index_buffer(), GPU_batch_create_ex(), GPU_BATCH_OWNS_INDEX, GPU_BATCH_OWNS_VBO, GPU_batch_program_set_builtin(), GPU_PRIM_LINES, GPU_PRIM_TRIS, GPU_SHADER_3D_SMOOTH_COLOR, GPU_USAGE_STREAM, GPU_vertbuf_create_with_format_ex(), GPU_vertbuf_data_alloc(), GPU_vertformat_attr_add(), and GPU_vertformat_clear().
| blender::ed::vse::SeqQuadsBatch::~SeqQuadsBatch | ( | ) |
Definition at line 64 of file sequencer_quads_batch.cc.
References BLI_assert_msg, and GPU_batch_discard().
| void blender::ed::vse::SeqQuadsBatch::add_line | ( | float | x1, |
| float | y1, | ||
| float | x2, | ||
| float | y2, | ||
| const uchar | color1[4], | ||
| const uchar | color2[4] ) |
Add a line with two endpoint colors.
Definition at line 155 of file sequencer_quads_batch.cc.
References BLI_assert, data, and draw().
|
inline |
Add a line with single color.
Definition at line 72 of file sequencer_quads_batch.hh.
References add_line().
Referenced by add_line(), blender::ed::vse::add_vertical_line(), blender::ed::vse::draw_histogram(), blender::ed::vse::draw_seq_waveform_overlay(), blender::ed::vse::draw_vectorscope_graticule(), and blender::ed::vse::draw_waveform_graticule().
|
inline |
Add an axis-aligned quad.
Definition at line 39 of file sequencer_quads_batch.hh.
References add_quad().
Referenced by add_quad(), add_quad(), blender::ed::vse::draw_cache_background(), blender::ed::vse::draw_cache_final_iter_fn(), blender::ed::vse::draw_cache_source_iter_fn(), blender::ed::vse::draw_cache_stripe(), blender::ed::vse::draw_histogram(), blender::ed::vse::draw_multicam_highlight(), blender::ed::vse::draw_seq_fcurve_overlay(), blender::ed::vse::draw_seq_waveform_overlay(), blender::ed::vse::draw_strip_offsets(), blender::ed::vse::draw_vectorscope_graticule(), blender::ed::vse::drawmeta_contents(), and blender::ed::vse::sequencer_retiming_draw_continuity().
| void blender::ed::vse::SeqQuadsBatch::add_quad | ( | float | x1, |
| float | y1, | ||
| float | x2, | ||
| float | y2, | ||
| float | x3, | ||
| float | y3, | ||
| float | x4, | ||
| float | y4, | ||
| const uchar | color1[4], | ||
| const uchar | color2[4], | ||
| const uchar | color3[4], | ||
| const uchar | color4[4] ) |
Add a quad with four arbitrary coordinates and a color for each.
Definition at line 90 of file sequencer_quads_batch.cc.
References BLI_assert, data, draw(), and v2.
|
inline |
Add a quad with four arbitrary coordinates and one color.
Definition at line 44 of file sequencer_quads_batch.hh.
References add_quad().
| void blender::ed::vse::SeqQuadsBatch::add_wire_quad | ( | float | x1, |
| float | y1, | ||
| float | x2, | ||
| float | y2, | ||
| const uchar | color[4] ) |
Add four lines of an axis-aligned quad edges.
Definition at line 124 of file sequencer_quads_batch.cc.
References BLI_assert, data, draw(), and v2.
Referenced by blender::ed::vse::draw_strip_offsets(), blender::ed::vse::draw_vectorscope_graticule(), and blender::ed::vse::draw_waveform_graticule().
| void blender::ed::vse::SeqQuadsBatch::draw | ( | ) |
Draw all the previously added primitives.
Definition at line 72 of file sequencer_quads_batch.cc.
References GPU_batch_draw_range(), GPU_vertbuf_tag_dirty(), and GPU_vertbuf_use().
Referenced by add_line(), add_quad(), add_wire_quad(), blender::ed::vse::draw_cache_view(), blender::ed::vse::draw_histogram(), blender::ed::vse::draw_retiming_continuity_ranges(), blender::ed::vse::draw_seq_strips(), blender::ed::vse::draw_vectorscope_graticule(), blender::ed::vse::draw_waveform_graticule(), and blender::ed::vse::sequencer_draw_scopes().