public EffectExD3d11 GetEffect(string name) { EffectExD3d11 fx = null; m_EffectList.TryGetValue(name, out fx); return(fx); }
public void CreateEffect(CreateEffectCmd cmd) { EffectExD3d11 fx = new EffectExD3d11(); fx.m_D3dDevice = m_D3dDevice; fx.CreateFromFile(cmd.SrcFileName); m_EffectList.Add(cmd.Name, fx); }
public InputLayout GetInputLayout(string effectName, VertexLayoutD3d11 decl) { InputLayout layout = null; EffectExD3d11 fx = null; if (m_EffectList.TryGetValue(effectName, out fx)) { if (!m_InputLayoutList.TryGetValue(decl, out layout)) { // if there isn't a match, try to create a new layout // create a new layout using input elems layout = new InputLayout(m_D3dDevice, fx.GetMainTechnique().Description.Signature, decl.Elems); m_InputLayoutList.Add(decl, layout); } } return(layout); }
public void CreateEffect(CreateEffectCmd cmd) { EffectExD3d11 fx = new EffectExD3d11(); fx.m_D3dDevice = m_D3dDevice; fx.CreateFromFile(cmd.SrcFileName); m_EffectList.Add(cmd.Name, fx); }