Vertex Buffer & Texture

Started by
1 comment, last by The Lion King 19 years, 10 months ago
Hi, I have to place different objects of same size (quad) on the screen with different textures. The quantity of textures will be more than 100 (I presume) ... what I want to ask is should I use one Vertex Buffer to display all objects (textures) by loading textures in seperate class or seperate vertex buffer & textures for each object? Hope I asked my question right? Thanks!
Advertisement
If all of the quads vertex structure type is the same, there is no reason that you cannot keep them in the same vertex buffer, just be sure to specify proper values/ranges for all your DP calls (likewise you can store all your indices in one index buffer). You will need a separate DP call for each texture grouping.
A handy trick is to dump many textures into one larger texture, called a texture atlas or something. This will enable you to group large groups of quads together since they will share the same large texture. Note that a quad tiling/wrapping etc will not work with a texture atlas.

[edit]: typos.

[edited by - SoulSpectre on June 1, 2004 12:06:16 AM]
OK ... got the point ... thanx!

This topic is closed to new replies.

Advertisement