Fix T65669 Bones in Envelope Display break apart after selecting bone
This was because the VAOs were not updated if an instance batch was reusing a VBO containing instances attributes which was reinitialized. Now we ensure the Batch will reconfigure the VAOs if the VBO is 0.
This commit is contained in:
@@ -141,7 +141,7 @@ GPUBatch *DRW_temp_batch_instance_request(DRWInstanceDataList *idatalist,
|
||||
|
||||
GPUBatch *batch = BLI_memblock_alloc(idatalist->pool_instancing);
|
||||
bool is_compatible = (batch->gl_prim_type == geom->gl_prim_type) && (batch->inst == buf) &&
|
||||
(batch->phase == GPU_BATCH_READY_TO_DRAW);
|
||||
(buf->vbo_id != 0) && (batch->phase == GPU_BATCH_READY_TO_DRAW);
|
||||
for (int i = 0; i < GPU_BATCH_VBO_MAX_LEN && is_compatible; i++) {
|
||||
if (batch->verts[i] != geom->verts[i]) {
|
||||
is_compatible = false;
|
||||
@@ -167,7 +167,7 @@ GPUBatch *DRW_temp_batch_request(DRWInstanceDataList *idatalist,
|
||||
GPUPrimType prim_type)
|
||||
{
|
||||
GPUBatch *batch = BLI_memblock_alloc(idatalist->pool_batching);
|
||||
bool is_compatible = (batch->verts[0] == buf) &&
|
||||
bool is_compatible = (batch->verts[0] == buf) && (buf->vbo_id != 0) &&
|
||||
(batch->gl_prim_type == convert_prim_type_to_gl(prim_type));
|
||||
if (!is_compatible) {
|
||||
GPU_batch_clear(batch);
|
||||
|
||||
Reference in New Issue
Block a user