For rendering many animated sprites efficiently, a sprite renderer is required.
The main job of the sprite renderer should be to accumulate all sprites that need to be rendered in a per layer scheme. Lower layers are rendered first. The renderer needs a description of all possible sprite animations possible where a single animation could be instantiated many times at different orientation, position, time and so forth.
As a first approach, the animation is done on the CPU and all data is transferred to the GPU using an array object where vertex pulling and quad rescale can happen.
For more efficient access to the data, all sprites should be encoded into a single image texture if possible or provided by a texture array. The texture array feature does not exist at the moment [#231].
For rendering many animated sprites efficiently, a sprite renderer is required.
The main job of the sprite renderer should be to accumulate all sprites that need to be rendered in a per layer scheme. Lower layers are rendered first. The renderer needs a description of all possible sprite animations possible where a single animation could be instantiated many times at different orientation, position, time and so forth.
As a first approach, the animation is done on the CPU and all data is transferred to the GPU using an array object where vertex pulling and quad rescale can happen.
For more efficient access to the data, all sprites should be encoded into a single image texture if possible or provided by a texture array. The texture array feature does not exist at the moment [#231].