   Help! drawing textures in a triangle strip.
  Hi, I'm trying to do a 2d engine in C# with direct 3d and learn while I do it. I've been reading books/tutorials on how to accomplish it, drawing textures, triangles, coordinates, etc.Most of these guides, to render the map, use a single triangle fan and render it many times, and I know at this time, performance is not a problem, because of new hardware, processors, etc.But even so, I would like to practice as well on how to improve performance. I searched on the internet, and found out that to make things faster, load a big texture (512x512) with the real textures in it, and just move the texture’s coordinates to match the desired texture.So, instead of using a single triangle fan, I tried to use a triangle strip to batch things and draw them with one call, texture was fine for the first square.[1][3][5][0][2][4]That's how the triangle strip is represented, texture from vectors 0,1,2 and 3 were fine (adjust the texture coordinates), but I want to add a different texture between ->[3] --- [5][2] and [4]But when it draws it, it grabs the coordinates from 3 and 2, and not drawing a texture that has different coordinates.I tried to search about how to solve it, I couldn't find exactly what I wanted, and everything I found was to render and do many draw calls, which I don't want to.I found something about indexes or triangle adjacencies, but I'm really lost here.The only solution I could come up with was to declare many triangle fans (vertices), so I could add different textures to each square, is it good enough?.And I also found out that what I want to do and the method I came up with, it's really no difference with the new hardware, in performance. Is it true?Hehe sorry for my english, not my main languague.   
  Dude, I'm sorry to tell you this, but there is no idial solution for this problem... Your solution is in the end.I was searching a smilar solution for a smiliar problem such yours. Look at this page(I know it's not your problem but understanding that whould help you):http://msdn.microsoft.com/en-us/library/bb205592%28v=VS.85%29.aspxIt's a guide how to create a simple cube in .X format(Direct3D). You don't need to understand what they did there, because I will tell you the main idea. Be notice that in .X file you can set up normal for each side of the cube, so the cube would look solid. They used only on 8 vertices such as the number of points of the cube. But if you want to draw it in DirectX without a mesh, you will need to use at least 24 vertices. Why? Because you can set up a normal for each vertices and not only for each side of the cube. But it's happens only on solid object. On smooth object it's ok because you don't want that each triangle(or "side") will be normal unified. So its took me time to understand the there is no an idial solution. The funniest thing is that after awhile, I understood that for each cube vertices DirectX split it up for 3 vetices with the same position but with a diffrent normals by itself!There is many more examples in DirectX that you have to do this. You need to set up the vertices 3 and 5 twice. The first will have one texture cordinate, and the second will have another. However, you can still use triangle strip.(If you don't know how ask)Good luck!   ;  oh thank you. About that, yeah.. i wanted to do something like that, for every triangle different texture coordinates. But thanks, now I know that i can accomplish that with mesh.Previously, i said about making many triangle fans, i was wrong. Drawing a triangle strip with duplicates vertices its good enough for a row, and now i can set different texture coordinates to each square, and with this, i can draw many (mainly map) texture with fewer draw calls.I was fine with that, but i searched a little more, and came up with degenerated triangles, in a triangle strip you can set the next triangle with different x and y texture coordinates, if you set a triangle with zero size between them 2 squares (=4 triangles).Here is how to do it: http://msdn.microsoft.com/en-us/library/bb206273%28VS.85%29.aspxSo now I can draw as many rows / columns as i want. Im gonna start looking at msdn more often... Note: you can also use triangle lists, as for performance is not a really big difference (except in old hardware), that is if your application is simple. Reference: http://www.gamedev.net/community/forums/topic.asp?topic_id=570576&whichpage=1   ;  Yes, this is what I meant when I said that you still can do it with triangle strip.And remember that even know that the mesh can solve this problem with less vertices, DirectX still use this cordinate as many vertices(as the number of different date), so there is not any performance benefit for using mesh.So good luck and it have been a pleasure to assist you.   