Table of Contents

Method GetRenderingAdapter

Namespace
PaintDotNet.AppModel
Assembly
PaintDotNet.Core.dll

GetRenderingAdapter()

Retrieves the IDXGIAdapter that Paint.NET uses for rendering effects, adjustments, and tools. This is the adapter that the user can select in the Graphics section in Settings.

SafeDxgiAdapter GetRenderingAdapter()

Returns

SafeDxgiAdapter

A SafeDxgiAdapter that manages the COM object pointer.

If the caller stores the COM object pointer after retrieving it from SafeDxgiAdapter with the DangerousGetHandle() method, it should call IUnknown::AddRef() on the pointer and then call IUnknown::Release() when it is finished with it (as per standard COM ref counting rules).

Remarks

This method may return an adapter for a hardware device or the WARP device, depending on the user's settings or other factors. The adapter will meet the minimum requirements for Paint.NET's use: Feature Level 11, compute shaders, and all required precisions and buffer formats (Alpha8, Bgra32, Rgba64, Rgba64Half, and Rgba128Float). It is up to the caller to evaluate the device's capabilities if their requirements go beyond that (e.g. Feature Level 12, double precision floating point).