Exemplo n.º 1
0
        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);
        }
Exemplo n.º 2
0
 internal void BindShaders(ref MyShaderBundle desc)
 {
     SetIL(desc.InputLayout);
     SetVS(desc.VS);
     SetPS(desc.PS);
 }
Exemplo n.º 3
0
 internal void BindShaders(ref MyShaderBundle desc)
 {
     SetIL(desc.InputLayout);
     SetVS(desc.VS);
     SetPS(desc.PS);
 }