Commit: c49f91a3b604da2b26b6c8bc2d3736c84870fe1b Author: Clément Foucault Date: Tue Jun 11 23:35:35 2019 +0200 Branches: master https://developer.blender.org/rBc49f91a3b604da2b26b6c8bc2d3736c84870fe1b
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. =================================================================== M source/blender/draw/intern/draw_instance_data.c =================================================================== diff --git a/source/blender/draw/intern/draw_instance_data.c b/source/blender/draw/intern/draw_instance_data.c index e7a41ee3e43..3e5dfb53fc7 100644 --- a/source/blender/draw/intern/draw_instance_data.c +++ b/source/blender/draw/intern/draw_instance_data.c @@ -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); _______________________________________________ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org https://lists.blender.org/mailman/listinfo/bf-blender-cvs