I'm working on a Component/Entity-System based game engine atm. And I have this little dilemma. I have simple geometrical structures which might be downloaded or created in game at some point. These structures are used to create models that are used in OpenGL and OpenGL ES and then for some collision processing. During dev and Beta I am quite ok with maintaining data copies for the physics and the display. But I started thinking about the future of this engine as I already invested some spare time over a year and a half in it. Now I would like to duplicate a few routines into OpenCL kernels and use the power of GPUs for the server side of my engine (and be ready for OpenCL enabled mobile hardware/software).
The structures are of variable size and moving or stationary structures can be deformed or broken... ATM the storage is very inefficient.
I thought of using a few mega arrays of GLfloat (Compatible with OpenCL) which would contain my structures depending on their size and pass only the transformations needed each frame. My Components would then point to these arrays.
Is it the right approach? If not, how to store the structure data to get it loaded only when needed to GPU memory and maintain the Component structure.
Do I even need a system and components to display and manipulate the structures?
Note: This is not a homework. It is more a question of interest to get a little multiplayer side project running as nicely as possible.
Note: I can't create an OpenCL tag so if someone else could and add it to the question it would be appreciated.