예제 #1
0
        private void HandleRender(CommandList cl)
        {
            locationBuffer.Update(cl);
            camera.Update(cl);
            gridRenderer.Render(cl);
            if (geometryBuffers == null)
            {
                return;
            }

            geometryBuffers.SetBuffers(cl);
            foreach (var(subMesh, index) in geometryBuffers.SubMeshes.Indexed())
            {
                (materials[index] as IMaterial).Apply(cl);
                cl.DrawIndexed(
                    indexStart: (uint)subMesh.IndexOffset,
                    indexCount: (uint)subMesh.IndexCount,
                    instanceCount: 1,
                    vertexOffset: 0,
                    instanceStart: 0);
            }

            skeletonRenderer?.Render(cl);
            planeRenderer.Render(cl);
            triangleRenderer.Render(cl);
        }
예제 #2
0
        private void HandleRender(CommandList cl)
        {
            if (worldBuffers == null)
            {
                return;
            }

            if (updateViewFrustumCulling)
            {
                worldRenderer.UpdateVisibility();
            }

            if (renderCulledSections)
            {
                worldRenderer.RenderForceAll(cl);
            }
            else
            {
                worldRenderer.Render(cl);
            }

            if (highlightedSectionI >= 0)
            {
                boundsRenderer.Render(cl);
                planeRenderer.Render(cl);
            }

            if (!updateViewFrustumCulling)
            {
                frustumRenderer.Render(cl);
            }

            triangleRenderer.Render(cl);
            rayRenderer.Render(cl);
        }