public EffectPass(string rasterizer, string blend, string depthStencil, string shader, string vertexEntryPoint, string pixelEntryPoint, TechniqueTags tags, Effect effect) { if (rasterizer != "") { _hasRasterizerState = true; _rasterizerState = MaterialManager.RenderStates.GetRasterizerState(rasterizer); } if (blend != "") { _hasBlendState = true; _blendState = MaterialManager.RenderStates.GetBlendState(blend); } if (depthStencil != "") { _hasDepthStencilState = true; _depthStencilState = MaterialManager.RenderStates.GetDepthStencilState(depthStencil); } _tags = tags; _shader = new Shader(shader, tags, true, pixelEntryPoint, vertexEntryPoint); }
public void AddDepthStencilState(string name, DepthStencilState state) { depthStencilLastAdded++; depthStencilStates[depthStencilLastAdded] = state; depthStencilNames.Add(name, depthStencilLastAdded); state.SetNameAndIndex(name, depthStencilLastAdded); }
public static void SetDepthStencilState(DepthStencilState state) { DeviceContext.OutputMerger.SetDepthStencilState(state.NativeDepthStencilState); }
public void SetDefaultStates(string rasterizer, string blend, string depthstencil) { DefaultRasterizerState = GetRasterizerState(rasterizer); DefaultBlendState = GetBlendState(blend); DefaultDepthStencilState = GetDepthStencilState(depthstencil); }
public void SetDepthStencilState(DepthStencilState state) { if (state == null) GraphicManager.SetDepthStencilState(DefaultDepthStencilState); else GraphicManager.SetDepthStencilState(state); }