Esempio n. 1
0
        public void draw(IDeviceContext context, ref Matrix4x4 worldView, ref Matrix4x4 projection)
        {
            var constants = new VsConstants(ref worldView, ref projection);

            context.writeBuffer(vsConstants, ref constants);

            // Set the pipeline state
            context.SetPipelineState(pipelineState);
            // Commit shader resources. RESOURCE_STATE_TRANSITION_MODE_TRANSITION mode makes sure that resources are transitioned to required states.
            context.CommitShaderResources(resourceBinding);

            mesh.draw(context);
        }