rifter1818 Posted March 24, 2004 Posted March 24, 2004 With Vertex Declaration If i want the Position and texture Coordinants only, Dim PT() As VertexElement = {New VertexElement(0, 0, DeclarationType.Float3, DeclarationMethod.Default, DeclarationUsage.Position, 0), _ New VertexElement(0, 12, DeclarationType.Float2, DeclarationMethod.Default, DeclarationUsage.TextureCoordinate, 0), VertexElement.VertexDeclarationEnd} PositionTexture.VDec = New VertexDeclaration(D3d.Device, PT) If I want to Pass a Vertex Buffer thats got Position NOrmal And Texture Elements to the vertex Shader do i need to create a new Declaration? if i pass a position only Vertex buffer? Quote
Kavan Posted March 24, 2004 Posted March 24, 2004 You'll have to create a new vertex declaration as the presence of normal will change the offset of the texture information from 12 to 24. The same for position only (here you don't even have en element for texture coordinates). Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.