• Advertisement
Sign in to follow this  

Advice required: DirectX7 => XNA

This topic is 2160 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi,

I'm hoping to get some advice; I really want to get the old terrarium project (http://terrarium2.codeplex.com/) running again, but I dont know anything about graphics, directx etc.

The way I see it it runs DirectX7 which does not work on windows 7, so I figured there was two options.

1) upgrade it to run a later version of DirectX

2) try and rewrite with XNA

I've spent a fair amount of time trying to rewrite it in DX11 now, but to no avail - I cant seem to find the corresponding line in SlimDX:

DirectX7 directX = new DirectX7();

So now I've spent even more time trying to rewrite the renderer with XNA, it compiles; finally... but I get a reflection error that it can't load Microsoft.Xna.Framework.dll which is just baffling me now, I can't see where it is calling this from.

Could someone suggest which would be my best chance of success?

Thanks,

Scott

Share this post


Link to post
Share on other sites
Advertisement
Either routes will work.

Since DX 10 the api has changed dramatically and the calls to create the DirectX object have been removed, and replaced with standard C API functions to create the device and swap chain.

public static Result Device.CreateWithSwapChain(DriverType driverType, DeviceCreationFlags flags,
FeatureLevel[] featureLevels, SwapChainDescription swapChainDescription, out Device device, out SwapChain swapChain);

This function achieves the same thing without the need to create a D3D object first, this is taken from slimdx tutorial.

In the XNA case is the dll added as a reference to the project>?

Share this post


Link to post
Share on other sites
I get the error {"Retrieving the COM class factory for component with CLSID {E1211353-8E94-11D1-8808-00C04FC2C602} failed due to the following error: 80040154."}System.Exception {System.Runtime.InteropServices.COMException} when trying to run it - I have downloaded the dll's that are required and registered them but that did not seem to make a difference.

I think I might go down the XNA route - The DirectX stuff baffles me much more - at least I can kinda Get my head around how the SpriteBatch works.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement