public void CreateOCLImages(Context context) { OCLInputImage = CreateOCLBitmapFromBitmap(TestImage); OCLOutputImage = oclContext.CreateImage2D(MemFlags.WRITE_ONLY, CL.ImageFormat.RGBA8U, panelScaled.Width, panelScaled.Height, 0, IntPtr.Zero); OCLSampler = oclContext.CreateSampler(true, AddressingMode.CLAMP_TO_EDGE, FilterMode.LINEAR); }
public void ReleaseDeviceResources() { oclFullyInitialized = false; if (OCLSampler != null) { OCLSampler.Dispose(); OCLSampler = null; } if (OCLInputImage != null) { OCLInputImage.Dispose(); OCLInputImage = null; } if (OCLOutputImage != null) { OCLOutputImage.Dispose(); OCLOutputImage = null; } if (FilterKernel != null) { FilterKernel.Dispose(); FilterKernel = null; } if (oclProgram != null) { oclProgram.Dispose(); oclProgram = null; } if (oclCQ != null) { oclCQ.Dispose(); oclCQ = null; } if (oclContext != null) { oclContext.Dispose(); oclContext = null; } }
public void SetSamplerArg(int argIndex, Sampler sampler) { SetIntPtrArg(argIndex, sampler.SamplerID); }
/// <summary> /// Set argument argIndex to sampler /// </summary> /// <param name="argIndex"></param> /// <param name="sampler"></param> public void SetArg(int argIndex, Sampler sampler) { SetArg(argIndex, sampler.SamplerID); }
/// <summary> /// Set argument argIndex to sampler /// </summary> /// <param name="argIndex"></param> /// <param name="sampler"></param> public void SetArg(Int32 argIndex, Sampler sampler) { this.SetArg(argIndex, sampler.SamplerID); }
/// <summary> /// Set argument argIndex to sampler /// </summary> /// <param name="argIndex"></param> /// <param name="sampler"></param> public void SetArg(int argIndex, Sampler sampler) { SetArg(argIndex, sampler.SamplerID); }
public void SetSamplerArg(int argIndex, Sampler sampler) { SetIntPtrArg(argIndex, sampler.SamplerID); }