Click here to Skip to main content
14,669,375 members
Rate this:
Please Sign up or sign in to vote.
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.
Posted
Updated 21-Aug-20 2:51am
Comments
Gerry Schmitz 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.
Gerry Schmitz 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.

https://support.microsoft.com/en-ca/help/179113/how-to-install-the-latest-version-of-directx
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.
Gerry Schmitz 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.
Shao Voon Wong 21-Aug-20 7:39am
   
Don't bother to write a .X importer yourself. It is a very complicated file format. No parser existed yet that can load all .X out there, last I checked.
Gerry Schmitz 21-Aug-20 8:29am
   
I prefer difficult and complicated over easy. That's why they usually hire me: to go where others fear and fail.
Shao Voon Wong 19-Aug-20 21:15pm
   
Find out the DirectX version your project is using and install its SDK and reference the headers and libs accordingly.
Bobadi 20-Aug-20 8:58am
   
Are you suggesting installing the old DirectX SDK I used with Visual Studio 2008? Can I do that? Would that work?
Shao Voon Wong 20-Aug-20 19:32pm
   
Yes, it should work.

1 solution

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




CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100