You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Sep 1, 2026. It is now read-only.
public TqkLibrary.Wpf.Interop.DirectX.D3D11Image image; // an image bind render result and return to font-end
public Image2D(Image2DViewGeometry viewGeometry)
{
d2dFactory = new SharpDX.Direct2D1.Factory();
image = new TqkLibrary.Wpf.Interop.DirectX.D3D11Image();
image.WindowOwner = (new System.Windows.Interop.WindowInteropHelper(BaseViewModel.MainView)).Handle;
image.OnRender -= OnRender;
image.OnRender += OnRender;
wpfImage.Souce = image;
}
private void OnRender(IntPtr resourcePtr, bool isNewSurface)
{
if (isNewSurface)
{
InitializeTextureAndBuffers(resourcePtr);
}
}
public void InitializeTextureAndBuffers(IntPtr resourcePtr)
{
SharpDX.DXGI.Resource resource = CppObject.FromPointer<SharpDX.DXGI.Resource>(resourcePtr).QueryInterface<SharpDX.DXGI.Resource>();
renderTarget = engine.device.OpenSharedResource<D3D11.Texture2D>(resource.SharedHandle);
Utilities.Dispose(ref renderTargetView);
renderTargetView = new D3D11.RenderTargetView(engine.device, renderTarget);
//Utilities.Dispose(ref d2dFactory);
SharpDX.DXGI.Surface surface = renderTarget.QueryInterface<SharpDX.DXGI.Surface>();
Utilities.Dispose(ref renderTarget_2d);
renderTarget_2d = new SharpDX.Direct2D1.RenderTarget(d2dFactory, surface, new SharpDX.Direct2D1.RenderTargetProperties(new SharpDX.Direct2D1.PixelFormat(SharpDX.DXGI.Format.Unknown, SharpDX.Direct2D1.AlphaMode.Premultiplied)));
}
I find it can render in Nvaid Geforce RTX 4090, but when I run the program in Nvadia RTX A6000, it is not work!
Why? Dose it not support Nvadia RTX A6000 card?
I use follow way to bind wpf image
I find it can render in Nvaid Geforce RTX 4090, but when I run the program in Nvadia RTX A6000, it is not work!
Why? Dose it not support Nvadia RTX A6000 card?