DX11 Geometry texture coordinates

Hi All DX11’ers

I am trying to create a new geometry with texture coordinates. The texture coordinates don’t translate easily to the vertex positions so I’d like to generate two separate spreads of vertices and texture coordinates.

in DX9 I would think really hard and create lists of vertex positions and texture coordinates for each vertex position and then a list of indices to build the geometry.

but as I can see in DX11 I can create a list of vertices and avoid making the indices list, as long as I make the vertices in the right order.

The tutorials and examples I can find does way more sophisticated stuff both with geometry and textures, but I can find any example of how to make your own texture coordinates.

How do I do that or am I thinking about it wrong?


I’m not sure to understand what you need, but I can show you how I deal with texture coordinates and indices…

the first shape is simple enough to generate the indices automatically. and you can always generate the texture coordinates in this way

for more complicated shapes, you must work a little bit with paper and pen for the indices… or, if you find a way to do it in automatic, PLEASE TELL ME!

Indices.zip (30.7 kB)

ah, yes, that makes sense.

Thanks Luper