Example #1
0
 public void BeginTransformFeedback(GAL.PrimitiveTopology topology)
 {
     if (!_tfEnabled)
     {
         BeginTransformFeedbackInternal();
         _tfEnabled = true;
     }
 }
Example #2
0
        public static Silk.NET.Vulkan.PrimitiveTopology Convert(this GAL.PrimitiveTopology topology)
        {
            switch (topology)
            {
            case GAL.PrimitiveTopology.Points:
                return(Silk.NET.Vulkan.PrimitiveTopology.PointList);

            case GAL.PrimitiveTopology.Lines:
                return(Silk.NET.Vulkan.PrimitiveTopology.LineList);

            case GAL.PrimitiveTopology.LineStrip:
                return(Silk.NET.Vulkan.PrimitiveTopology.LineStrip);

            case GAL.PrimitiveTopology.Triangles:
                return(Silk.NET.Vulkan.PrimitiveTopology.TriangleList);

            case GAL.PrimitiveTopology.TriangleStrip:
                return(Silk.NET.Vulkan.PrimitiveTopology.TriangleStrip);

            case GAL.PrimitiveTopology.TriangleFan:
                return(Silk.NET.Vulkan.PrimitiveTopology.TriangleFan);

            case GAL.PrimitiveTopology.LinesAdjacency:
                return(Silk.NET.Vulkan.PrimitiveTopology.LineListWithAdjacency);

            case GAL.PrimitiveTopology.LineStripAdjacency:
                return(Silk.NET.Vulkan.PrimitiveTopology.LineStripWithAdjacency);

            case GAL.PrimitiveTopology.TrianglesAdjacency:
                return(Silk.NET.Vulkan.PrimitiveTopology.TriangleListWithAdjacency);

            case GAL.PrimitiveTopology.TriangleStripAdjacency:
                return(Silk.NET.Vulkan.PrimitiveTopology.TriangleStripWithAdjacency);

            case GAL.PrimitiveTopology.Patches:
                return(Silk.NET.Vulkan.PrimitiveTopology.PatchList);

            case GAL.PrimitiveTopology.Quads:     // Emulated with triangle fans.
                return(Silk.NET.Vulkan.PrimitiveTopology.TriangleFan);

            case GAL.PrimitiveTopology.QuadStrip:     // Emulated with triangle strips.
                return(Silk.NET.Vulkan.PrimitiveTopology.TriangleStrip);
            }

            Logger.Debug?.Print(LogClass.Gpu, $"Invalid {nameof(GAL.PrimitiveTopology)} enum value: {topology}.");

            return(Silk.NET.Vulkan.PrimitiveTopology.TriangleList);
        }
Example #3
0
 public void BeginTransformFeedback(GAL.PrimitiveTopology topology)
 {
     _tfEnabled = true;
 }