Sign in to follow this  
Njguy

dx effects are ridiculous

Recommended Posts

I have been trying for the longest time to get my application to load effect files. The samples in the sdk's are total junk. There is so much in the sample its hard to figure out where to begin. Is there a way for your application to generically load effects, because the samples in the sdk, appear to be custom written and only load the one effect. I need some help.

Share this post


Link to post
Share on other sites
What exactly do you want to know? You can browse DirectX SDK Documentation for the documentation on how to use the DX functions. You just have to call one of theses depending on where you shader code is:

D3DX10CreateEffectFromFile (to load a .fx file)
D3DX10CreateEffectFromMemory
D3DX10CreateEffectFromResource

And then you will have a valid ID3D10Effect variable. Also, an effect is not a technique. You can have multiple techniques in one effect file and switch between them. You can also have multiple pass per techniques and also switch between them.

edit : that was assuming you use DX10

Share this post


Link to post
Share on other sites
Go here and download the code for part II. Look in chapter 8, the code samples there should be easier to understand.

Also, from your previous post it seems that you are working with the code from this book, so you might find this interesting.

Share this post


Link to post
Share on other sites
Thanks gage your a big help as always. Yes I was using code from that book, I got permission from the author to use it in anyway. I've basically scrapped the old approach I was using and started fresh. Thank you.

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