32 for (
int i = 0; i < info->
ntris; i++) {
38 gpu::VertBuf *vbo = GPU_vertbuf_create_with_format(format);
67 const float color[4],
const float (*verts)[3],
uint vert_count,
uint pos,
uint primitive_type)
75 for (
int i = 1; i < vert_count; i++) {
85 int tri_count = vert_count - 2;
87 for (
int i = 0; i < tri_count; i++) {
96 for (
int i = 0; i < vert_count; i++) {
#define GPU_batch_uniform_4fv(batch, name, val)
void wm_gizmo_geometryinfo_draw(const GizmoGeomInfo *info, const bool, const float color[4])
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 immBegin(GPUPrimType, uint vertex_len)
void GPU_batch_discard(gpu::Batch *batch)
void immUniformColor4fv(const float rgba[4])
gpu::IndexBuf * GPU_indexbuf_build(GPUIndexBufBuilder *)
void wm_gizmo_vec_draw(const float color[4], const float(*verts)[3], uint vert_count, uint pos, uint primitive_type)
@ GPU_SHADER_3D_UNIFORM_COLOR
void GPU_batch_draw(gpu::Batch *batch)
void GPU_indexbuf_add_tri_verts(GPUIndexBufBuilder *, uint v1, uint v2, uint v3)
uint GPU_vertformat_attr_add(GPUVertFormat *format, StringRef name, gpu::VertAttrType type)
void GPU_batch_program_set_builtin(gpu::Batch *batch, GPUBuiltinShader shader_id)
void immVertex3fv(uint attr_id, const float data[3])
void GPU_vertbuf_attr_fill(gpu::VertBuf *, uint a_idx, const void *data)
void GPU_vertbuf_data_alloc(gpu::VertBuf &verts, uint v_len)
void GPU_face_culling(GPUFaceCullTest culling)
void GPU_depth_test(GPUDepthTest test)