Beispiel #1
0
        public void CmdDebugMarkerBeginEXT(VkDebugMarkerMarkerInfoEXT markerInfo)
        {
            var unmanagedSize =
                markerInfo.SizeOfMarshalIndirect();
            var unmanagedArray = new byte[unmanagedSize];

            fixed(byte *unmanagedStart = unmanagedArray)
            {
                var unmanaged      = unmanagedStart;
                var _commandBuffer = Handle;
                var _pMarkerInfo   = markerInfo.MarshalIndirect(ref unmanaged);

                Direct.CmdDebugMarkerBeginEXT(_commandBuffer, _pMarkerInfo);
            }
        }
Beispiel #2
0
        public static VkDebugMarkerMarkerInfoEXT.Raw MarshalDirect(this VkDebugMarkerMarkerInfoEXT s, ref byte *unmanaged)
        {
            if (s == null)
            {
                throw new InvalidOperationException("Trying to directly marshal a null.");
            }

            var pNext       = s.Next.MarshalIndirect(ref unmanaged);
            var pMarkerName = s.MarkerName.MarshalIndirect(ref unmanaged);

            VkDebugMarkerMarkerInfoEXT.Raw result;
            result.sType       = VkStructureType.DebugMarkerMarkerInfoEXT;
            result.pNext       = pNext;
            result.pMarkerName = pMarkerName;
            result.color       = s.Color;
            return(result);
        }
Beispiel #3
0
 public static int SizeOfMarshalIndirect(this VkDebugMarkerMarkerInfoEXT s) =>
 s == null ? 0 : s.SizeOfMarshalDirect() + VkDebugMarkerMarkerInfoEXT.Raw.SizeInBytes;