Пример #1
0
        void buildCommandBuffers()
        {
            for (int i = 0; i < swapChain.ImageCount; ++i)
            {
                cmds[i]?.Free();
                cmds[i] = cmdPool.AllocateAndStart();
#if PIPELINE_STATS
                statPool.Begin(cmds[i]);
                recordDraw(cmds[i], frameBuffers[i]);
                statPool.End(cmds[i]);
#else
                recordDraw(cmds[i], frameBuffers[i]);
#endif

                cmds[i].End();
            }
        }
Пример #2
0
        void buildCommandBuffers()
        {
            for (int i = 0; i < swapChain.ImageCount; ++i)
            {
                cmds[i]?.Free();

                cmds[i] = cmdPool.AllocateCommandBuffer();
                cmds[i].Start();

                statPool.Begin(cmds[i]);
                cmds[i].BeginRegion("draw" + i, 0.5f, 1f, 0f);
                cmds[i].Handle.SetDebugMarkerName(dev, "cmd Draw" + i);
                recordDraw(cmds[i], frameBuffers[i]);
                cmds[i].EndRegion();
                statPool.End(cmds[i]);
                cmds[i].End();
            }
        }
Пример #3
0
        void buildCommandBuffers()
        {
            for (int i = 0; i < swapChain.ImageCount; ++i)
            {
                cmds[i]?.Free();
                cmds[i] = cmdPool.AllocateCommandBuffer();
                cmds[i].Start();

#if DEBUG
                statPool.Begin(cmds[i]);
                recordDraw(cmds[i], frameBuffers[i]);
                statPool.End(cmds[i]);

                debugDraw.RecordDraw(cmds[i], debugFB[i], camera);
#else
                recordDraw(cmds[i], frameBuffers[i]);
#endif

                cmds[i].End();
            }
        }
Пример #4
0
 protected override void recordDraw(CommandBuffer cmd, int imageIndex)
 {
     statPool.Begin(cmd);
     renderer.buildCommandBuffers(cmd, imageIndex);
     statPool.End(cmd);
 }