Hi there!
I am currently implementing a complex grid using Java2d and I would be interrested in wether it is worth to group same operations together.
For example I have a 2-dimensional array and each zell in this array represents a zell in the grid, I do e.g. the following operations per zell in the follwing order:
every time:
- setColor
- fillRect
sometimes:
- setColor
- drawChars
- setColor
- fillPoly
The fills are always very small (not more than e.g. fillRect 12x18).
For each zell some arithmetical stuff is done.
Do you think it would be worth to group these operations at all or is it a waste of time?
For example first only setColor/fillRect and after this only setColor/drawChars - or may the same operations not be “interrupted” by a setColor? Or would it be beneficial to group the paints by color?
I am writing this espacially with the new accerlated pipelines (especially OGL) in mind.
Thanks in advance, lg Clemens