28 for (
int i = 0; i < quads_count; i++) {
29 const uint i0 = i * 4 + 0;
30 const uint i1 = i * 4 + 1;
31 const uint i2 = i * 4 + 2;
32 const uint i3 = i * 4 + 3;
65 "SeqQuadsBatch is being destroyed without drawing quads/lines it contains");
77 verts_quads =
nullptr;
84 verts_lines =
nullptr;
96 const uchar color1[4],
97 const uchar color2[4],
98 const uchar color3[4],
99 const uchar color4[4])
101 if (quads_num >= MAX_QUADS) {
104 if (quads_num == 0) {
124 if (lines_num + 4 > MAX_LINES) {
127 if (lines_num == 0) {
154 float x1,
float y1,
float x2,
float y2,
const uchar color1[4],
const uchar color2[4])
156 if (lines_num + 1 > MAX_LINES) {
159 if (lines_num == 0) {
#define BLI_assert_msg(a, msg)
blender::gpu::Batch * GPU_batch_create_ex(GPUPrimType primitive_type, blender::gpu::VertBuf *vertex_buf, blender::gpu::IndexBuf *index_buf, eGPUBatchFlag owns_flag)
void GPU_batch_discard(blender::gpu::Batch *batch)
void GPU_batch_program_set_builtin(blender::gpu::Batch *batch, eGPUBuiltinShader shader_id)
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)
ATTR_WARN_UNUSED_RESULT const BMVert * v2
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])
void add_quad(float x1, float y1, float x2, float y2, const uchar color[4])
VecBase< float, 2 > float2
static blender::gpu::IndexBuf * create_quads_index_buffer(int quads_count)
blender::ColorTheme4b color