Exemplo n.º 1
0
 static UiRenderCommand()
 {
     thePipelineState = new PipelineState();
     thePipelineState.blending.enabled          = true;
     thePipelineState.shaderState.shaderProgram = Canvas.theShader;
     thePipelineState.blending.enabled          = true;
     thePipelineState.culling.enabled           = false;
     thePipelineState.depthTest.enabled         = false;
     thePipelineState.vaoState.vao = new VertexArrayObject();
     thePipelineState.vaoState.vao.bindVertexFormat(Canvas.theShader, V2T2B4.bindings());
     thePipelineState.generateId();
 }
Exemplo n.º 2
0
        public UIPass(RenderTarget target)
            : base("UI", "ui")
        {
            renderTarget = target;

            PipelineState ps = new PipelineState();

            ps.blending.enabled          = true;
            ps.shaderState.shaderProgram = Canvas.theShader;
            ps.blending.enabled          = true;
            ps.culling.enabled           = false;
            ps.depthTest.enabled         = false;

            ps.vaoState.vao = new VertexArrayObject();
            ps.vaoState.vao.bindVertexFormat(ps.shaderState.shaderProgram, V2T2B4.bindings());
            ps.generateId();

            myRenderQueue      = Renderer.device.createRenderQueue(ps);
            myRenderQueue.name = "UI";
            registerQueue(myRenderQueue);
        }