All right, dudes, I''ve posted a question here a couple times, and nobody in the D3D camp seems to know the answer. I turn to the OpenGL''ers...
In my program, I want to have vertices that have the same xyz coordinate, but different uv coordinates (for textures). In Direct3D, every vertex gets one texture coordinate, so if I have two vertices on top of eachother, but with different tex coords, they have to get transformed twice. Have you ever heard of anything slower?
So, my question is, does OpenGL allow you to either attach multiple texture coords to a vertex, or, better yet (this is what I did in my software engine) assign the texture coords when you place the triangle?
I might switch over to OpenGL if I have to. Probably should have started there in the first place, since D3D took me six weeks to get proficient in.
Thanks in advance!
The answer to your question depends on how you are drawing your triangles. If you are using vertex arrays you can''t have multiple verts with the same texture coordinate. I have tried to find a way around this but it turned out that it was easier to just duplicate the vertex and assign it the second texture coordinate. If you are drawing using normal glBegin/glEnd then you can have a vert with multiple texture coords since you can specify the texture coordinate as you draw. Using glBegin/glEnd is not the fastest approach to things though. the best way to go. Hope this helps.
Yeah, for D3D you should look up Flexible Vertex Format in the SDK Help. It describes all you need to know about it. You definately want to define your own vertex format since D3D''s won''t fit most peoples needs.