Sign in to follow this  
THACO

Triangle strips and textures

Recommended Posts

Ok I need some advice and help. First off, The main parts of my game/engine when it comes to meshes are the static level then characters / entities. I will use VBO's for all of them. I also will created triangle strips, should I create them for every mesh? Also how do I line up the texture verticies with a strip of triangles? I mean each vertex has multiple texture coords depending on the face it is currently being used for? Does this mean my texture coords array will be the same reguardless of using strips or just plain triangles? Currently when I create my strips, I put all verts into a pool to index into. Each vertex in the pool has its unique combination of position and normal, should I add in texture verts in their? I tried testing my strip generation using NvTriStrips and currently my object has default texture verts for each face (this means that all verts appear to be different when you take into account normal, pos, and tex coords) My output gives me double the verticies in the triangle strip compared to just using regular triangles? I am faily confindent I am creating the Pool correctly. -THACO

Share this post


Link to post
Share on other sites
u need exactly the same number of verts as texture coords/normals etc. doesnt matter what u use triangles/quads/tri strips that irelavant

Share this post


Link to post
Share on other sites
Thanks, that is what I thought, so how does this make tri strips better. Maybe I need to go back and look at my exporting of objects, but I seem have have different texture coords for each different face the vertex is being used for. This means that using triangle strips at best would be the same as using regular triangles since all verts are unique. Am I correct or is there someway around this?


-THACO

Share this post


Link to post
Share on other sites
if thats how your data is setup then yes, you are correct, you need a unique vertex for every position as you have unique texture coordinates per position.

I'd argue that triangle strips arent better, with a strip arranged indexed triangle list you'll get practically the same performance as makes no difference as triangle strips however you can avoid the problem of having to perfectly stripify your models, just build lists of triangles and send 'em down to the hardware.
As its strip arrange you'll be taking full advantage of pre/post-T&L caches and as you dont have to issue perfect strips you can infact draw more with each draw call (instead of one strip per call you can have a buffer with multiple lists in it which can be drawn at once).

Strips had their biggest win back when HWT&L caches were small and data transfer was an issue, now the bottlenecks will have moved else where in the pipeline as you make the vertex and fragment units do more work, so extracting every drop of performance from the transfer isnt critical and sending duplicate data isnt a problem. Add into the mix VBOs allowing you to control when you move data to the card and things become much saner [smile]

Share this post


Link to post
Share on other sites
Thanks phantom. I thought maybe it was just me, I hear so many good things about tri strips, I figured there was something I misunderstood. I will still go back and check my texture coords, because I don't think all would be unique, but my few tests have come back with every vertex being different. So ill probably stay my course and go with GL_TRIANGLES like i ahve it

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this