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

CanvasSwapChain should expose buffer as CanvasRenderTarget #982

Open
lukasf opened this issue Jan 18, 2025 · 0 comments
Open

CanvasSwapChain should expose buffer as CanvasRenderTarget #982

lukasf opened this issue Jan 18, 2025 · 0 comments

Comments

@lukasf
Copy link

lukasf commented Jan 18, 2025

I wonder why the CancasSwapChain only allows directly creating a drawing session on the buffer. Internally, it creates a ID2D1Bitmap1, which is the equivalent of a CanvasRenderTarget, but the it immediately creates a CanvasDrawingSession from it and returns it.

As an alternative, I think it would be good to also allow getting the buffer as CanvasRenderTarget. Then it would be possible to use interop for accessing the underlying texture and directly rendering to it using d3d or d2d, opening up usage of CancasSwapChain in a lot of other, interop based scenarios.

Are there any opinion on this? I am a bit surprised that this is not yet available.

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