Beispiel #1
0
        public static DeviceSampler Create(Boolean normalizedCoords, AddressingMode addressingMode, FilterMode filterMode, Context context)
        {
            CLError error = new CLError();

            CLSampler sampler = OpenCLDriver.clCreateSampler(context.CLContext, normalizedCoords ? CLBool.True : CLBool.False, (CLAddressingMode)addressingMode, (CLFilterMode)filterMode, ref error);

            OpenCLError.Validate(error);

            return(new DeviceSampler()
            {
                openCLSampler = sampler
            });
        }