Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't support Nvdia Rtx A6000 card #50

Open
KnewHow opened this issue Jul 22, 2024 · 0 comments
Open

Don't support Nvdia Rtx A6000 card #50

KnewHow opened this issue Jul 22, 2024 · 0 comments

Comments

@KnewHow
Copy link

KnewHow commented Jul 22, 2024

I use follow way to bind wpf image

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant