30 for (
int i = 0;
i < quads_count;
i++) {
31 const uint i0 =
i * 4 + 0;
32 const uint i1 =
i * 4 + 1;
33 const uint i2 =
i * 4 + 2;
34 const uint i3 =
i * 4 + 3;
67 "SeqQuadsBatch is being destroyed without drawing quads/lines it contains");
79 verts_quads =
nullptr;
86 verts_lines =
nullptr;
98 const uchar color1[4],
99 const uchar color2[4],
100 const uchar color3[4],
101 const uchar color4[4])
103 if (quads_num >= MAX_QUADS) {
106 if (quads_num == 0) {
126 if (lines_num + 4 > MAX_LINES) {
129 if (lines_num == 0) {
156 float x1,
float y1,
float x2,
float y2,
const uchar color1[4],
const uchar color2[4])
158 if (lines_num + 1 > MAX_LINES) {
161 if (lines_num == 0) {
#define BLI_assert_msg(a, msg)
void GPU_batch_discard(blender::gpu::Batch *batch)
void GPU_batch_program_set_builtin(blender::gpu::Batch *batch, GPUBuiltinShader shader_id)
blender::gpu::Batch * GPU_batch_create_ex(GPUPrimType primitive_type, blender::gpu::VertBuf *vertex_buf, blender::gpu::IndexBuf *index_buf, GPUBatchFlag owns_flag)
void GPU_batch_draw_range(blender::gpu::Batch *batch, int vertex_first, int vertex_count)
void GPU_indexbuf_init(GPUIndexBufBuilder *, GPUPrimType, uint prim_len, uint vertex_len)
blender::gpu::IndexBuf * GPU_indexbuf_build(GPUIndexBufBuilder *)
void GPU_indexbuf_add_tri_verts(GPUIndexBufBuilder *, uint v1, uint v2, uint v3)
@ GPU_SHADER_3D_SMOOTH_COLOR
void GPU_vertbuf_use(blender::gpu::VertBuf *)
blender::gpu::VertBuf * GPU_vertbuf_create_with_format_ex(const GPUVertFormat &format, GPUUsageType usage)
void GPU_vertbuf_tag_dirty(blender::gpu::VertBuf *verts)
void GPU_vertbuf_data_alloc(blender::gpu::VertBuf &verts, uint v_len)
BMesh const char void * data
ATTR_WARN_UNUSED_RESULT const BMVert * v2
void add_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_wire_quad(float x1, float y1, float x2, float y2, const uchar color[4])
static blender::gpu::IndexBuf * create_quads_index_buffer(int quads_count)
ColorTheme4< uint8_t > ColorTheme4b
VecBase< float, 2 > float2
blender::ColorTheme4b color