Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DirectX 11 platform with Windows 8+ SDK #148

Open
Cholerix opened this issue Aug 10, 2018 · 2 comments
Open

DirectX 11 platform with Windows 8+ SDK #148

Cholerix opened this issue Aug 10, 2018 · 2 comments

Comments

@Cholerix
Copy link
Contributor

With the Windows SDK 8 Microsoft merged the previously separate DirectX SDK into the Windows SDK. It appears MyGUI never followed this change as building it for Windows still requires the old DirectX SDK.
Changes that affect MyGUI are:

  • D3DX was removed. This means texture loading no longer works as it used to. DirectXTex provides an alternative that only requires a few changes.
  • Since DirectX is now part of the Windows SDK, header and library files can be used without setting a path in the project settings. A path to said files is no longer required in CMake.

Implementing a fix to the first problem was easy enough. DirectXTex can be included in a project using Visual Studio's packet manager NuGet, a process that could probably be automated. However, for the SDK path further changes to the CMake files are required. Right now a VS solution can only be built if the path to the old DirectX SDK is provided. After that every project configuration has to be edited manually to remove the path to the library files.

I would be willing to make these changes and submit them once they are ready but there is one question: Should the build with the old DirectX SDK be abandoned in favour of the newer Windows SDK or should there be a second DirectX 11 platform using the Windows SDK?

@Altren
Copy link
Contributor

Altren commented Aug 10, 2018

I think it's ok to abandon old DirectX SDK for DirectX 11 platform.

@Cholerix
Copy link
Contributor Author

Small update
Switching from D3DX to DirectXTex worked fine initially. Against my expections there is no way to automate the inclusion of nuget packages while building the project with CMake. So right now after building with CMake the MyGUI.DirectX11Platform project will not compile since the header DirectXTex.h can not be found. Once that is fixed, DirectXTex must also be included in every project that uses MyGUI.DirectX11Platform (the editors and demo projects) otherwise linking with fail.

That's just in VS2017 though. DirectXTex no longer supports VS2013. Older versions I tried won't compile due to toolset version mismatch. Presumably VS2015 will work but I don't have it installed. This means multiple versions of MyGUI_DirectX11Texture.cpp would be required. One for new VS versions and one for older versions which would have to use the legacy Directx SDK.

All in all this is not a satisfying situation. Maybe the changes for VS2015/2017 and their respective Windows SDKs can be kept on a separate branch similar to the Ogre 2.1 branch?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants