-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
For the upcoming PDN 5.1 release, which should be in mid-November alongside .NET 9's release, I've made PaintDotNet.AppModel.IDxgiAdapterService available for use by all plugins (previously was only available for the bundled DDS FileType Plus plugin).
Your plugin fits the intended use exactly, which is using other (non-Direct2D) DirectX APIs with the GPU chosen by the user in Settings -> Graphics -> Rendering Device.
https://paintdotnet.github.io/apidocs/api/PaintDotNet.AppModel.IDxgiAdapterService.html
using SafeComObject safeDxgiAdapter = this.Services.GetService<IDxgiAdapterService>().GetRenderingAdapter();
bool hasRef = false;
safeDxgiAdapter.DangerousAddRef(ref hasRef);
try
{
void* pDxgiAdapter = (void*)safeDxgiAdapter.DangerousGetHandle();
...
}
finally
{
if (hasRef)
{
safeDxgiAdapter.DangerousRelease();
}
}You can get started now with the PDN 5.1 beta if you'd like: https://forums.getpaint.net/topic/131545-paintnet-51-beta-build-9066/
Metadata
Metadata
Assignees
Labels
No labels