Blender V5.0
blender::ed::vse::SeqQuadsBatch Class Reference

#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])

Detailed Description

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.

Constructor & Destructor Documentation

◆ SeqQuadsBatch()

◆ ~SeqQuadsBatch()

blender::ed::vse::SeqQuadsBatch::~SeqQuadsBatch ( )

Definition at line 64 of file sequencer_quads_batch.cc.

References BLI_assert_msg, and GPU_batch_discard().

Member Function Documentation

◆ add_line() [1/2]

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().

◆ add_line() [2/2]

void blender::ed::vse::SeqQuadsBatch::add_line ( float x1,
float y1,
float x2,
float y2,
const uchar color[4] )
inline

◆ add_quad() [1/3]

◆ add_quad() [2/3]

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.

◆ add_quad() [3/3]

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 color[4] )
inline

Add a quad with four arbitrary coordinates and one color.

Definition at line 44 of file sequencer_quads_batch.hh.

References add_quad().

◆ add_wire_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().

◆ draw()


The documentation for this class was generated from the following files: