public bool VerticesWriteChannel <T>(VertexElementSemantic semantic, T[] data, byte[] writeToVertices) where T : unmanaged
        {
            var vertexStructure = VertexStructure.Value;

            if (vertexStructure != null)
            {
                vertexStructure.GetInfo(out var vertexSize, out _);
                var vertexCount = writeToVertices.Length / vertexSize;

                if (vertexStructure.GetElementBySemantic(semantic, out var element))
                {
                    unsafe
                    {
                        if (VertexElement.GetSizeInBytes(element.Type) == sizeof(T))
                        {
                            fixed(byte *pVertices = writeToVertices)
                            {
                                byte *src = pVertices + element.Offset;

                                for (int n = 0; n < vertexCount; n++)
                                {
                                    *(T *)src = data[n];
                                    src      += vertexSize;
                                }
                            }
                        }
                    }
                    return(true);
                }
            }

            return(false);
        }
        public T[] VerticesExtractChannel <T>(VertexElementSemantic semantic) where T : unmanaged
        {
            var vertexStructure = VertexStructure.Value;

            if (vertexStructure != null)
            {
                vertexStructure.GetInfo(out var vertexSize, out _);

                var vertices = Vertices.Value;
                if (vertices != null)
                {
                    var vertexCount = vertices.Length / vertexSize;

                    if (vertexStructure.GetElementBySemantic(semantic, out var element))
                    {
                        unsafe
                        {
                            if (VertexElement.GetSizeInBytes(element.Type) == sizeof(T))
                            {
                                T[] result = new T[vertexCount];
                                fixed(byte *pVertices = vertices)
                                {
                                    byte *src = pVertices + element.Offset;

                                    for (int n = 0; n < vertexCount; n++)
                                    {
                                        result[n] = *(T *)src;
                                        src      += vertexSize;
                                    }
                                }

                                return(result);
                            }
                        }
                    }
                }
            }

            return(null);
        }