Texture Buffer Object (TBO) and Instancing

I would like to use TBOs to store instances transformations to a special 1D samplerBuffer, and I successfully coded a test application for using this 1D samplerBuffer.
At the moment I’m using one TBO for each model and I’m updating TBO’s float data according to model’s instances translation and rotation. With constant number of models and instance there isn’t any problem because relative TBOs size remains the same and I just need to update data in same buffer index positions.

My hierarchical structure for models with instances:

[ul]
[li]Model_1:[/li][LIST]
[li]TextureBufferObject (containing 2 instances data)[/li][li]Visible Instances Count (to not parse, again, whole list at every render loop)[/li][li]Instances:[/li][LIST]
[li]Instance_1:[/li][LIST]
[li]Translation[/li][li]Rotation[/li][li]IsVisible?[/li][/ul]

[li]Instance_2:[/li][ul]
[li]Translation[/li][li]Rotation[/li][li]IsVisible?[/li][/ul]
[/LIST]
[/LIST]

[li]Model_2:[/li][ul]
[li]TextureBufferObject (containing 1 instance data)[/li][li]Visible Instances Count[/li][li]Instances:[/li][LIST]
[li]Instance_1:[/li][LIST]
[li]Translation[/li][li]Rotation[/li][li]IsVisible?[/li][/ul]
[/LIST]
[/LIST]
[/LIST]

For each Model structure I’ve attached a different TBO which contains its model’s instances transformations.

Now the problem: sometimes a Model Instance could became temporarily invisible, frustum/occlusion culled or permanently deleted (due to time elapsed) between two different rendered frames, and I should remove its instance’s transformation floats from Model’s TBO.
Removing those floats needs to re-size TBO and upload whole modified buffer again.
Is this the right way? One TBO for each Model?

Thanks in advance for any help! :slight_smile: