Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

my problem is probably trivial but I'm new to DX and have some trouble. I've found a code snippet (of a Shader class) with ID3D10Effect and ID3D10EffectTechnique types but I'm using DX11 so I changed these to ID3D11Effect and ID3D11EffectTechnique. But the compiler protested saying that it doesn't know such types. I thought: "maybe there aren't such types actually" but quick google search indicated otherwise. I cannot find any information on which header they're in, though.

So which one is it? I've also found out that there used to be a header called d3dx10math.h but there's no d3dx11math.h. Why is that? Are there any other headers/types abandoned in DX11?

share|improve this question

1 Answer 1

up vote 3 down vote accepted

The Effects framework no longer ships and you don't get headers or libs for it. What you do get is the entire source code for it (in e.g. C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Samples\C++\Effects11) so you can compile it and link to it yourself.

I expect that this is just provided for use with older programs upgrading to D3D11 however; new programs shouldn't use Effects but should instead call the raw API, as with state objects and cbuffers the old advantages of Effects are gone and in fact there are several disadvantages to using it.

The main such disadvantage would be relating to cbuffer updates; these need to be more carefully considered and planned, and by hiding this from you Effects can potentially lead to serious performance issues.

You can still use d3dx10math with D3D11. That's just a software-only math library, and you can use any such math library you wish - even the old d3d9 one, or one written for OpenGL.

There are a handful of other enums and defines that still use D3D10 prefixes but I can't recall them offhand - a quick search through the D3D11 header files should turn them up.

share|improve this answer
    
Does the remark about using raw API over Effects also apply to Techniques/Groups/Passes? (Although I might be confusing some concepts.) –  NPS May 7 '13 at 17:09
    
Techniques and passes are just a software construct; you can write your own code to emulate them (it's just a for loop and some Set calls). –  Darth Satan May 7 '13 at 17:22

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.