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 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 gpu::IndexBuf * create_quads_index_buffer(int quads_count)
BLI_assert(slot->slot_subtype.map==BMO_OP_SLOT_SUBTYPE_MAP_FLT)
void GPU_vertbuf_tag_dirty(gpu::VertBuf *verts)
ColorTheme4< uint8_t > ColorTheme4b
gpu::Batch * GPU_batch_create_ex(GPUPrimType primitive_type, gpu::VertBuf *vertex_buf, gpu::IndexBuf *index_buf, GPUBatchFlag owns_flag)
void GPU_indexbuf_init(GPUIndexBufBuilder *, GPUPrimType, uint prim_len, uint vertex_len)
void GPU_batch_discard(gpu::Batch *batch)
void GPU_vertbuf_use(gpu::VertBuf *)
void GPU_batch_draw_range(gpu::Batch *batch, int vertex_first, int vertex_count)
gpu::IndexBuf * GPU_indexbuf_build(GPUIndexBufBuilder *)
VecBase< float, 2 > float2
BMesh const char void * data
@ GPU_SHADER_3D_SMOOTH_COLOR
void GPU_indexbuf_add_tri_verts(GPUIndexBufBuilder *, uint v1, uint v2, uint v3)
gpu::VertBuf * GPU_vertbuf_create_with_format_ex(const GPUVertFormat &format, GPUUsageType usage)
uint GPU_vertformat_attr_add(GPUVertFormat *format, StringRef name, gpu::VertAttrType type)
void GPU_batch_program_set_builtin(gpu::Batch *batch, GPUBuiltinShader shader_id)
ATTR_WARN_UNUSED_RESULT const BMVert * v2
void GPU_vertbuf_data_alloc(gpu::VertBuf &verts, uint v_len)
void GPU_vertformat_clear(GPUVertFormat *)