dx effects are ridiculous

Started by
3 comments, last by Njguy 15 years, 4 months ago
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.
Advertisement
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
I use dx9 actually.
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.
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.

This topic is closed to new replies.

Advertisement