Sign in to follow this  
Zanzibar

SlimDX: Effect class raises error

Recommended Posts

Hi First of all, you did a great job writing SlimDX. After two days of renaming namespaces and changing some small things, I was able to get my project up and running. The framerate went up from 240 (MDX) to 300 - 340 (SlimDX). So an increased fps of 25 is really not a bad sideeffect. But I have noticed two small issues. The Direct3D.Adapters collection is not loaded when first called, but I need to explicit call the Direct3D.Initialise method first or a null exception will occur. Second, I have some difficulties getting effects up and running. Eff = Direct3D.Effect.FromFile(aDevice, FFileName, Direct3D.ShaderFlags.None); This raises an not implemented exception on the june sdk. kind regards Alexander

Share this post


Link to post
Share on other sites
Quote:

The Direct3D.Adapters collection is not loaded when first called, but I need to explicit call the Direct3D.Initialise method first or a null exception will occur.

By design. Properties should be lightweight, so whenever possible they should not involve something as complex as delay-loading a DLL -- and that's what Initialize() is doing. The intent behind this is to not load anything you don't actually want (for example, you probably don't want us loading up the assemblies for EVERY interface we support -- D3D9 and D3D10 at the same time, for example, is not that desirable in general).

Quote:

Eff = Direct3D.Effect.FromFile(aDevice, FFileName, Direct3D.ShaderFlags.None);
This raises an not implemented exception on the june sdk.

This may be a bug, but you could also just be running into the situation where the filename you're passing doesn't exist or is malformed. In this case you will get a HRESULT from D3DX which SlimDX will turn into an exception and throw, by default.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this