I’ve always wondered the reasoning behind why we must always define D3DVERTEX. Is it because Microsoft wants to allow the opportunity to put this in a class and overload operators, or is there another reason?
Thanks
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
It’s so you can use whatever is convenient for your application. If you need a normal as part of your vertex, you can have that. If you don’t need a normal then you save 12 bytes per vertex. If you need colour information, texture coordinates, specular parameters and so on then you choose to define them or not depending on your specific needs.
If Microsoft were to provide a “D3DVERTEX” structure you’d either have 500 different versions, with different combinations of fields, or you’d have one enormous one that included every possible value, killing your bandwidth.