Reputation: 578
I am creating a game in which every primitive needs its own texture, but I can't seem to figure out how. I searched through Google but it only displays results about texture blending. Can you please tell me how to apply multiple textures on multiple non-indexed primitives? Or do they have to be indexed?
Upvotes: 0
Views: 223
Reputation: 509
You can change textures by calling SetTexture before each of DrawPrimitives.
Upvotes: 1
Reputation: 1379
I think using an UV atlas can solve your problem. An atlas is basically a large texture made up of smaller textures, like a photo collage. The UV coordinates of your vertices of course refer to the large texture, but if you know the position of your "small" textures, this is easy to calculate.
Of course you have to create that atlas texture first.
Upvotes: 0