Reputation: 1199
I'm considering using the scene2d package to render both simple rectangular geometry (for simple sprites) and more complex mesh geometry (for other things).
It seems to me that a Stage with Groups of Actors would be a good option for managing hierarchical relationships between rendered elements, not all of which are defined by simple rectangular sprites.
Is this approach correct? (ie. Am I "thinking in libgdx") If so, how do I render Mesh objects within the Actor draw() method?
Upvotes: 2
Views: 1187
Reputation: 10320
If by meshes you mean 3d Objects, there is no way of using the Actor draw method, because that uses a SpriteBatch and you must surely need a ModelBatch to render them.
Using scene2d for 3d objects would be just complicating it more anyways.
If you mean 2d complicated shapes. Then yes, you can do it, override the Actor draw method and put your object specific way of drawing there.
Upvotes: 1