Exemple #1
0
        public Sampler(Context context, bool normalizedCoords, AddressingMode addressingMode, FilterMode filterMode)
            : this()
        {
            if (context == Context.Null)
            {
                throw new ArgumentNullException("context");
            }

            unsafe
            {
                int error;
                Handle = Cl.CreateSampler(context.Handle,
                                          normalizedCoords ? 1u : 0u, (uint)addressingMode, (uint)filterMode, &error);
                ClHelper.GetError(error);
            }
        }