About ID3DXEffect

Started by
0 comments, last by 21st Century Moose 11 years, 11 months ago
1. Is ID3DXEffect creates render state block for those declared in "pass scope"?

technique tech
{
pass p0
{
ALPHABLENDENABLE = TRUE;
...
...
}
}


2. Does it do that at creation time (D3DXCreateEffectFromFile)?

3. Does it stores state block for each pass?

4. I guess it restores "old state" after EndPass() method?

5. What about sampler states?

texture decal_tex;
sampler decal_samp = sampler_state
{
Texture = <decal_tex>;
MIPFILTER = LINEAR;
MAGFILTER = LINEAR;
MINFILTER = LINEAR;
ADDRESSU = BORDER;
ADDRESSV = BORDER;
BORDERCOLOR = 0xFFFFFFFF;
};


Does it do the same thing?

Thanks for your time.
Advertisement
The documentation answers your qurestions: there are D3DXFX_DONOTSAVESTATE, D3DXFX_DONOTSAVESAMPLERSTATE and D3DXFX_DONOTSAVESHADERSTATE flags available for D3DXCreateEffect, so you may assume that by default an effect will save and restore states via state blocks and that it also includes sampler states.

Direct3D has need of instancing, but we do not. We have plenty of glVertexAttrib calls.

This topic is closed to new replies.

Advertisement