Exemplo n.º 1
0
        void recordDraw(PrimaryCommandBuffer cmd, FrameBuffer fb)
        {
            pipeline.RenderPass.Begin(cmd, fb);

            cmd.SetViewport(fb.Width, fb.Height);
            cmd.SetScissor(fb.Width, fb.Height);

            cmd.BindPipeline(pipeline, descriptorSet);

            cmd.PushConstant(pipeline, textColor);
            cmd.PushConstant(pipeline, outlineColor, 0, 16);

            cmd.BindVertexBuffer(vbo, 0);
            cmd.BindIndexBuffer(ibo, VkIndexType.Uint16);
            cmd.DrawIndexed((uint)ibo.ElementCount, 1, 0, 0, 0);

            pipeline.RenderPass.End(cmd);
        }