Why doesn't Direct3D have its own vertex structure?

I always wondered why we should always determine D3DVERTEX. Is it because Microsoft wants to allow the ability to put this in a class and overload operators, or is there another reason?

thank

+5
source share
1 answer

Thus, you can use whatever is convenient for your application. If you need a normal part of your vertex, you can get it. If you do not need normal, you save 12 bytes to the top. If you need color information, texture coordinates, mirror options, etc., you can determine whether or not they depend on your specific needs.

If Microsoft were to create the "D3DVERTEX" structure, you would have 500 different versions with different combinations of fields, or you would have one huge one that included all the possible values, killing your bandwidth.

+8
source

All Articles