static void DrawHighlightedPart(MyRenderContext RC, MyPart part, MyInstanceLodState state) { // settings per part (using MyPart.cs): MyShaderBundle shaderBundle = part.GetShaderBundle(state); RC.SetInputLayout(shaderBundle.InputLayout); RC.VertexShader.Set(shaderBundle.VertexShader); RC.PixelShader.Set(shaderBundle.PixelShader); // (using MyHighlightPass.cs): RC.SetRasterizerState(null); RC.DrawIndexed(part.IndicesCount, part.StartIndex, part.StartVertex); }
internal void BindShaders(ref MyShaderBundle desc) { SetIL(desc.InputLayout); SetVS(desc.VS); SetPS(desc.PS); }