microsoft / DirectXMesh

DirectXMesh geometry processing library
https://walbourn.github.io/directxmesh/
MIT License
786 stars 152 forks source link

FlexibleVertexFormat.h: use standard C fixed-width types instead of WINAPI ones #112

Closed Xottab-DUTY closed 1 year ago

Xottab-DUTY commented 1 year ago

They are used in file anyway. Making entire file use one kind of types (from cstdint) instead of another (from WINAPI) makes this header more portable.

walbourn commented 1 year ago

Given that this header includes d3d9.h which is entirely using Win32 data types, what scenario actually needs non-WIn32 type usage?

Xottab-DUTY commented 1 year ago

Given that this header includes d3d9.h which is entirely using Win32 data types, what scenario actually needs non-WIn32 type usage?

Compiling this on Linux, without d3d9.h. We just included some d3d9 types in our own headers (and modified FlexibleVertexFormat.h to include d3d9.h under #if __has_include condition) This wasn't 100% good reason for this PR, but I have another reason why I've created this PR: Making use of consistent types, so we don't mix BYTE/uint8_t and WORD/uint16_t. This make code generally more good looking.