34 void ensure_clear_batch()
37 if (
info.batch ==
nullptr) {
44 gpu::VertBuf *vbo = create_vbo();
48 template<
typename DataType,
typename RectType>
49 static void fill_tri_fan_from_rect(
DataType result[4][2], RectType &rect)
61 gpu::VertBuf *create_vbo()
66 fill_tri_fan_from_rect<int, rcti>(
pos,
info.clipping_bounds);
68 fill_tri_fan_from_rect<float, rctf>(uv,
info.clipping_uv_bounds);
70 for (
int i = 0; i < 4; i++) {
80 if (
format.attr_len == 0) {
void GPU_batch_init_ex(blender::gpu::Batch *batch, GPUPrimType primitive_type, blender::gpu::VertBuf *vertex_buf, blender::gpu::IndexBuf *index_buf, eGPUBatchFlag owns_flag)
#define GPU_BATCH_CLEAR_SAFE(batch)
#define GPU_vertbuf_create_with_format(format)
void GPU_vertbuf_attr_set(blender::gpu::VertBuf *, uint a_idx, uint v_idx, const void *data)
void GPU_vertbuf_data_alloc(blender::gpu::VertBuf &verts, uint v_len)
Create gpu::Batch for a IMAGE_ScreenSpaceTextureInfo.
BatchUpdater(TextureInfo &info)
Batch * GPU_batch_calloc()