/// <summary>
        ///
        /// </summary>
        /// <param name="data">Data pointer</param>
        /// <param name="offset">Offset in bytes on the Buffer to start reading</param>
        /// <param name="bytes">Number of bytes to read</param>
        public static unsafe void Read(this GraphicBuffer buffer, void *data, int offset, int bytes)
        {
            byte *pBuffer = (byte *)buffer.Map(MapType.Read, false);

            Runtime.Copy(pBuffer + offset, data, bytes);

            buffer.Unmap();
        }
        /// <summary>
        ///
        /// </summary>
        /// <param name="data">Data pointer</param>
        /// <param name="offset">Offset in bytes on the Buffer to start writing</param>
        /// <param name="bytes">Number of bytes to write</param>
        public static unsafe void Write(this GraphicBuffer buffer, void *data, int offset, int bytes, bool discard = true)
        {
            byte *pBuffer = (byte *)buffer.Map(discard ? MapType.Write_Discard : MapType.Write, false);

            Runtime.Copy(data, pBuffer + offset, bytes);

            buffer.Unmap();
        }