Original Post
Hi!
This problem has been giving me headache for quite som time, I've had several ideas which I've been coding for a few hours but suddenly realising this isn't gonna work and throwing it away, so I thought I should ask and see how other people have solved it. A model or mesh can consist of several submeshes/geometricdata (i.e. a vertexbuffer, indexbuffer and a material each). In Order to sort the rendering per Material each submesh need to be wrapped in a class which contains worldmatrix, the geometricdata and if animated skeleton data or other renderingrelated data and. Is this how its usually done, or do submeshes usually share the same materials and/or other renderparameters making it irrelevant (in the general case) to sort the submeshes into the renderqueue?
This problem has been giving me headache for quite som time, I've had several ideas which I've been coding for a few hours but suddenly realising this isn't gonna work and throwing it away, so I thought I should ask and see how other people have solved it. A model or mesh can consist of several submeshes/geometricdata (i.e. a vertexbuffer, indexbuffer and a material each). In Order to sort the rendering per Material each submesh need to be wrapped in a class which contains worldmatrix, the geometricdata and if animated skeleton data or other renderingrelated data and. Is this how its usually done, or do submeshes usually share the same materials and/or other renderparameters making it irrelevant (in the general case) to sort the submeshes into the renderqueue?