Example #1
0
        /// <summary>
        /// Slices the target space calling a 16-bit sampler on each node.
        /// </summary>
        /// <param name="clutPoints">An array holding the division slices for each component.</param>
        /// <param name="sampler">The callback to be executed on each node.</param>
        /// <param name="cargo">A user-supplied value to be passed to the callback.</param>
        /// <returns>true if successful, otherwise false.</returns>
        /// <exception cref="ArgumentException">
        /// <paramref name="clutPoints"/> is null or array size is zero.
        /// </exception>
        /// <remarks>
        /// When invoked, the <see cref="Sampler16"/> 'output' parameter is set to null.
        /// </remarks>
        public static bool SliceSpace(uint[] clutPoints, Sampler16 sampler, IntPtr cargo)
        {
            if (!(clutPoints?.Length > 0))
            {
                throw new ArgumentException($"'{nameof(clutPoints)}' array size must be greater than 0.");
            }

            return(Interop.SliceSpace16Bit((uint)clutPoints.Length, clutPoints, sampler, cargo) != 0);
        }
Example #2
0
 internal static int SliceSpace16Bit(uint nPoints, uint[] clutPoints, Sampler16 sampler, IntPtr cargo)
 {
     return(SliceSpace16_Internal(nPoints, clutPoints, sampler, cargo));
 }
Example #3
0
 private static extern int SliceSpace16_Internal(
     [MarshalAs(UnmanagedType.U4)] uint nPoints,
     [MarshalAs(UnmanagedType.LPArray, ArraySubType = UnmanagedType.U4)] uint[] clutPoints,
     Sampler16 sampler,
     IntPtr cargo);
Example #4
0
 internal static int StageSampleClut16Bit(IntPtr handle, Sampler16 sampler, IntPtr cargo, uint flags)
 {
     return(StageSampleCLut16bit_Internal(handle, sampler, cargo, flags));
 }
Example #5
0
 private static extern int StageSampleCLut16bit_Internal(
     IntPtr mpe,
     Sampler16 sampler,
     IntPtr cargo,
     [MarshalAs(UnmanagedType.U4)] uint flags);
Example #6
0
        /// <summary>
        /// Iterates on all nodes of the stage calling a 16-bit sampler on each node.
        /// </summary>
        /// <param name="sampler">The callback to be executed on each node.</param>
        /// <param name="cargo">A user-supplied value to be passed to the callback.</param>
        /// <param name="flags">Flags to control stage sampling.</param>
        /// <returns>true if successful, otherwise false.</returns>
        /// <exception cref="ObjectDisposedException">
        /// The Stage has already been disposed.
        /// </exception>
        public bool SampleCLUT(Sampler16 sampler, IntPtr cargo, StageSamplingFlags flags)
        {
            EnsureNotClosed();

            return(Interop.StageSampleClut16Bit(handle, sampler, cargo, Convert.ToUInt32(flags)) != 0);
        }