Original Post
I''m changing my terrain engine to use index buffers, since every point on the map is used by 6 triangles (apart from the edges). One problem I have is it doesn''t work above a certain number of polys in scene, but that''s not the point here.
The thing is, while the same vertex is used by many triangles, the texture coords at that vertex are NOT identical for each triangle. I want to know If I can put the colour and position information in one vertex struct that is used with an index buffer, and just the texture coords in a second vertex struct that is used without indexing.
i.e
Read about my game, project #1 NEW (31st July): There is a new demo, demo #2 at my site. Please try it out.
John 3:16
struct VERT
{
float x,y,z;
DWORD Diffuse;
};
struct TEXCOORD
{
float u,v;
};
VertexBuffer1=Lots of VERTs
VertexBuffer2=Lots of TEXCOORDS
IndexBuffer=Lots of indices
SetStreamSource(0,VertexBuffer1);
SetIndices(0,IndexBuffer);
SetStreamSource(1,VertexBuffer2);
If I do this, how do I tell the texture stages which Vertex buffer to get texture coords from (My texture is on stage 1, not stage 0 if that matters)
Thanks
Read about my game, project #1 NEW (31st July): There is a new demo, demo #2 at my site. Please try it out.
John 3:16