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

Recommended API and method #108

Closed
bylee20 opened this issue Feb 2, 2024 · 4 comments
Closed

Recommended API and method #108

bylee20 opened this issue Feb 2, 2024 · 4 comments

Comments

@bylee20
Copy link

bylee20 commented Feb 2, 2024

I am working with Qt and it provides various graphics backends including OpenGL and Direct3D 11/12.
As a starter, which graphics backend do you recommend?
Also, I found that I can send not only texture but also fbo or backbuffer directly. Is there benefitto use those instead of texture?

Thank you for great project.

@leadedge
Copy link
Owner

leadedge commented Feb 2, 2024

Fundamentally, sharing between processes is by way of DirectX 11 shared textures. OpenGL uses a driver interop to transfer from OpenGL. DirectX 12 uses D3D11on12 to transfer from D3D12. If you can use DirectX 11 directly, it is the most efficient way.

OpenGL uses an fbo blit to copy from the user texture to the interop linked, shared texture. There is negligible performance difference between send fbo or texture. SendBackbuffer gets the texture resource from the render target view. Again the time difference is negligible. The benefit is convenience if no texture resource is immediately available.

@PLEXtream
Copy link

Thank you for detailed answer!

@whiteeat
Copy link

whiteeat commented Jul 5, 2024

Is it possible to use DirectX 12 API to share textures between processes without relying on D3D11on12 in the future update of this repo?

@leadedge
Copy link
Owner

leadedge commented Jul 5, 2024

Not without replacing the DirectX 11 shared textures and the OpenGL/DirectX interop. There might be a way using external memory but I have had no success.

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

4 participants