directxmath osx/linux?

Started by
4 comments, last by Samurai Jack 10 years ago

Would directxmath.h work on osx/linux with OpenGL? I know there's the difference in normalized device coordinates but is there anything in the API that restricts it to Windows?

Thanks!

Edit:

I'm guessing these preprocessor directives would prevent it from running on the other platforms:


#if !defined(_XM_BIGENDIAN_) && !defined(_XM_LITTLEENDIAN_)
#if defined(_M_AMD64) || defined(_M_IX86) || defined(_M_ARM)
#define _XM_LITTLEENDIAN_
#elif defined(_M_PPCBE)
#define _XM_BIGENDIAN_
#else
#error DirectX Math does not support this target
#endif
#endif // !_XM_BIGENDIAN_ && !_XM_LITTLEENDIAN_
Advertisement

It is possible with some minor modifications.

I expect you will run in to some compile issues with WORD, DWORD and such, also probably you will have to do something about the intrinsics and compiler support in the header files which try to figure out if your CPU supports SSE2, but other than that it should be possible.

Worked on titles: CMR:DiRT2, DiRT 3, DiRT: Showdown, GRID 2, theHunter, theHunter: Primal, Mad Max, Watch Dogs: Legion

Thanks! Maybe I'll just go with GLM since my project needs to be cross-platform and it seems to work out of the box.

Just use GLM. Less trouble, and who knows, you might even like it more than DXMath :D

"I AM ZE EMPRAH OPENGL 3.3 THE CORE, I DEMAND FROM THEE ZE SHADERZ AND MATRIXEZ"

My journals: dustArtemis ECS framework and Making a Terrain Generator

Go with GLM!

http://glm.g-truc.net/0.9.5/index.html

This topic is closed to new replies.

Advertisement