Hello there,
I've been playing with traer physics, glgraphics and toxiclibs for a couple days, terrific stuff!
I'm also getting my first steps into opengl and was reading about VBOs for performance improvements, which brought me here to read a couple posts about it. So, I need a little advice/tip regarding the use of VBOs:
As far as I understood, when using VBO I need to compute/store model vertices on setup, but I was wondering if this can be used 'on the fly'. For example, I'd like to create something simple:
- I have an object called customSphere, which computes a custom sphere from scratch storing its data on floatBuffers.
- I also have a particle system. Each time a certain event is called (i.e. mousePressed) a new particle is created, and it remains alive for a short time period.
- The thing is I'd like to create a 'customSphere' for each of these particles, being able to set/modify its size, polygon detail (subsdivision), texture mapping, polygon distortion, etc, since each particle would interact with the others.
So I was wondering...
Which is the best approach for doing this (performance oriented)? Should I have each object calculated when it's created? Should I have a pre-calculated buffer and then, when the object is created, copy this into new buffers? or maybe just do operations like translate/rotate for each particle using an original pre-calculated buffer?
Any help/suggestion/advice would be really apreciated. Thanks in advance!
Jon
1