Click here to Skip to main content
15,936,897 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I developed a game using Visual Studio 2008 under Windows 7. The software imports models from DirectX (.x files), wraps the models in a texture (.bmp or .jpg), renders them to screen and I detect when the player clicks on them. Then my computer died and I now have Windows 10 and Visual Studio 2019. My software will no longer build! Visual Studio can no longer import .x files (That’s a minor problem because I can go back to Blender and re-export all the models in a different format). I have spent many hours searching for a solution without success. Can anybody point me to a sample program that can achieve the following:
1. Build under Windows 10, Visual Studio 2019, C++.
2. Import a simple 3D model from a file at run time. (any format is OK if it can be exported from Blender)
3. Render the model, wrapped in a texture (.bmp or .jpg)
4. Exit when the model is clicked.
5. Save my sanity.
Thank you

What I have tried:

Getting email help from Microsoft - nothing that works.
Microsoft help files - no help at all.
Microsoft sample programs - Can't find one that loads a model from a file.
Sample programs from Autodesk to use FBX files. They don't work.
Searching online for hours and hours, including codeproject.
Updated 21-Aug-20 2:51am
[no name] 19-Aug-20 12:57pm    
You review the "build errors" and correct them. You're looking for a solution (upgrade magic) that apparently doesn't exist.
Bobadi 19-Aug-20 14:06pm    
The "Build errors" are mainly references to DirectX include files and types that no longer exist. Despite hours of searching, I cannot find out what to replace them with so I can't "correct them". Just one example: I have a call to D3DXCreateTextureFromFileEx, this routine does not exist in the new SDK.
[no name] 19-Aug-20 15:33pm    
DirectX is not "retired"; so you look for an equivalent. You don't throw a whole platform away because they've done whatever to one function.
Bobadi 20-Aug-20 8:54am    
I know DirectX is not "retired" but the latest version does not accept models in .x format. I'm happy to use any other model format that will work. I'm not "throwing away the whole platform". The ONE function I mentioned is just an example. I HAVE installed the latest version of DirectX but I have been unable to find functions therein that are equivalents of functions I used in previous versions.
[no name] 20-Aug-20 9:39am    
I'm surprised at the lack of effort that was made by the ".x community" in not coming up with an .X "importer". I'll look into writing one if I have the need. Otherwise, I'd probably think of interfacing with Unity 3D for graphics above and beyond what WPF or UWP offers.

1 solution

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900