Вопрос

Do I need to use the DirectXMath structures (XMFLOAT3, XMFLOAT4, XMMATRIX, XMFLOAT4X4, etc.) when I am setting the data for the vertex and constant buffers for a directx application. I have my own Vector3 and Matrix structures and would prefer to use those.

Это было полезно?

Решение

You do not need to use DirectXMath. All you need to do is ensure that the data you write matches the standard (IEEE-754) floating point layout (or whatever other format you have specified). For vector types, just ensure that the elements are in contiguous memory.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top