Changeset View
Changeset View
Standalone View
Standalone View
source/blender/gpu/intern/gpu_batch.cc
| Show First 20 Lines • Show All 50 Lines • ▼ Show 20 Lines | |||||
| } | } | ||||
| void GPU_batch_init_ex(GPUBatch *batch, | void GPU_batch_init_ex(GPUBatch *batch, | ||||
| GPUPrimType prim_type, | GPUPrimType prim_type, | ||||
| GPUVertBuf *verts, | GPUVertBuf *verts, | ||||
| GPUIndexBuf *elem, | GPUIndexBuf *elem, | ||||
| eGPUBatchFlag owns_flag) | eGPUBatchFlag owns_flag) | ||||
| { | { | ||||
| BLI_assert(verts != nullptr); | |||||
| /* Do not pass any other flag */ | /* Do not pass any other flag */ | ||||
| BLI_assert((owns_flag & ~(GPU_BATCH_OWNS_VBO | GPU_BATCH_OWNS_INDEX)) == 0); | BLI_assert((owns_flag & ~(GPU_BATCH_OWNS_VBO | GPU_BATCH_OWNS_INDEX)) == 0); | ||||
| batch->verts[0] = verts; | batch->verts[0] = verts; | ||||
| for (int v = 1; v < GPU_BATCH_VBO_MAX_LEN; v++) { | for (int v = 1; v < GPU_BATCH_VBO_MAX_LEN; v++) { | ||||
| batch->verts[v] = nullptr; | batch->verts[v] = nullptr; | ||||
| } | } | ||||
| for (auto &v : batch->inst) { | for (auto &v : batch->inst) { | ||||
| ▲ Show 20 Lines • Show All 296 Lines • Show Last 20 Lines | |||||