Example #1
0
 public void CmdClearColorImage(Image image, ImageLayout imageLayout, ClearColorValue pColor, ImageSubresourceRange?pRange)
 {
     unsafe {
         ImageSubresourceRange  valpRange = pRange ?? default(ImageSubresourceRange);
         ImageSubresourceRange *ptrpRange = pRange != null ? &valpRange : (ImageSubresourceRange *)IntPtr.Zero;
         Interop.NativeMethods.vkCmdClearColorImage(this.m, image != null ? image.m : default(UInt64), imageLayout, pColor != null ? pColor.m : (Interop.ClearColorValue *) default(IntPtr), (UInt32)(pRange != null ? 1 : 0), ptrpRange);
     }
 }
Example #2
0
 public void CmdClearColorImage(Image image, ImageLayout imageLayout, ClearColorValue pColor, ImageSubresourceRange[] pRanges)
 {
     unsafe {
         var arraypRanges = pRanges == null ? IntPtr.Zero : Marshal.AllocHGlobal(pRanges.Length * sizeof(ImageSubresourceRange));
         var lenpRanges   = pRanges == null ? 0 : pRanges.Length;
         if (pRanges != null)
         {
             for (int i = 0; i < pRanges.Length; i++)
             {
                 ((ImageSubresourceRange *)arraypRanges) [i] = (pRanges [i]);
             }
         }
         Interop.NativeMethods.vkCmdClearColorImage(this.m, image != null ? image.m : default(UInt64), imageLayout, pColor != null ? pColor.m : (Interop.ClearColorValue *) default(IntPtr), (uint)lenpRanges, (ImageSubresourceRange *)arraypRanges);
         Marshal.FreeHGlobal(arraypRanges);
     }
 }
Example #3
0
 internal void Initialize()
 {
     lColor = new ClearColorValue (&m->Color);
 }
Example #4
0
        internal ClearValue(NativePointer pointer)
        {
            native = pointer;

            lColor = new ClearColorValue(new NativePointer(native.Reference, (IntPtr)(&M->Color)));
        }
Example #5
0
        public ClearValue()
        {
            native = Interop.Structure.Allocate(typeof(Interop.ClearValue));

            lColor = new ClearColorValue(new NativePointer(native.Reference, (IntPtr)(&M->Color)));
        }
Example #6
0
 internal void Initialize()
 {
     lColor = new ClearColorValue(&m->Color);
 }
Example #7
0
 internal void Initialize()
 {
     lColor = new ClearColorValue(new NativePointer(native.Reference, (IntPtr)(&m->Color)));
 }
Example #8
0
 public void SetColorValue(Color aColor)
 {
     //Color.Uint32 = new uint[] { aColor.B, aColor.G, aColor.R, aColor.A };
     lColor = new ClearColorValue(new uint[] { aColor.B, aColor.G, aColor.R, aColor.A });
     //lColornew NativePointer(native.Reference, (IntPtr)(&m->Color));
 }