VertexBuffer constructor: why both Type and VertexFormat?



I'm using the following constructor to create VertexBuffer's:

public VertexBuffer(Type, int, Device, Usage, VertexFormats, Pool) ;

I had a problem with my application, until I realized I was passing a Type
based on a PositionColored vertex and a VertexFormat set to PositionTextured
(FWIW, the goal was PositionTextured).

Why are both parameters required? It seems like if I passed a Type based on
a vertex that was different VertexFormat than what is passed it just
wouldn't work. I'm very much a beginner in regards to DirectX, so it's
possible mixing and matching can be done. I just don't know the rules yet
(except for the above based on the my example, where I learned you don't mix
PositionColored with PositionTextured)...

Thanks for responses! : )

For context: VS C++.NET 2005 PRO (and Express, using both!!! : ) using
clr:/pure syntax...

[==P==]




.



Relevant Pages

  • Re: Problem with linker
    ... but to have actually written a default constructor. ... such as overloading on int and pointer types. ... conversion of 0 to CString requires a user-defined conversion, ... acceleration operator *(distance d, time_squared t2); ...
    (microsoft.public.vc.mfc)
  • [BUG] sched: fair groups bug
    ... and found the deviation of the groups' CPU usage was larger than 2.6.26 ... volatile int end; ... int ret = 0; ...
    (Linux-Kernel)
  • FAQ Suggestions
    ... It can only be applied to reference type variables converting to ... The .NET runtime can't guarantee that parameterless constructors will be ... performing by not having to call constructor code. ... number like casting an int to short) are always explicit. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Languages for embedded
    ... calling constructors of the structure's members. ... If I want to know whether xyz had a constructor, ... On the other hand, if I have a C struct xyz, and the API provides a ... If function ftakes an int by value, it can't modify any int value ...
    (comp.arch.embedded)
  • Re: [RFC][PATCH 0/8] Critical Page Pool
    ... >The following patch series implements such a critical page pool. ... int get_dap_lock ... void *debug_kmalloc ... bestprev = prev; ...
    (Linux-Kernel)