Drawing many spheres

Hi there, I’m pretty new to OF and OpenGL. I’m making a simple scene right now that requires a bunch of floating bubbles inside a sphere, like this:

Right now Im putting 500 ofSpherePrimitives into a vector, then drawing them in a loop. I want to increase the number of spheres to thousands, and it seems like I’ll need to use ofVboMesh to do that while maintaining a decent frame rate. I assume I have to add the vertices from all my spheres into one vboMesh and then draw that? Does anyone have a good example of how to do this?

Thanks!

Council instances in GLSL or a good system of particles for example octree, check example/vboInstance or have a look at these examples of instance:


hi

1 Like