CUDA / Noesis
Posted: 21 May 2021, 13:02
I am looking into using Noesis for a project to use a XAML based UI in front of a texture created with CUDA.
Currently we are using WPF with a D3DImage. But that suffers from poor performance (no stable framerates) and screen tearing. I could transfer the CUDA texture directly on the GPU to DirectX/Direct3D as well as to OpenGL.
I've already looked at quite a few Noesis samples and documentations and played with the code myself, but I still lack some understanding in various areas. I would definitely like to use the Managed Application Framework from Noesis, as it is very close to the WPF framework.
Maybe you can help me with the following questions to get started:
1. Is there a preferred RenderContext when comparing DirectX11 and OpenGL? It is especially important to have a stable framerate and using VSync. Screen tearing must be avoided at all costs.
2. Where do I have to step into to get the texture into the background. Is this possible at all with the RenderContexts from the Application Framework or do I have to modify/reimplement them?
3) The documentation says that I have to save the GPU state before RenderOffscreen() and restore it afterwards. I must admit that I do not understand what exactly is meant by this. Is there perhaps an example where this is implemented?
Many, many thanks for any help :)
BTW: In the Application Framework for Windows there is the problem that a window that should be maximised at startup (WindowState=Maximized) is not correctly displayed maximized. If you maximize it later (e.g. due to an event) it works correctly. I have already checked the code, but could not find the error quickly.
Currently we are using WPF with a D3DImage. But that suffers from poor performance (no stable framerates) and screen tearing. I could transfer the CUDA texture directly on the GPU to DirectX/Direct3D as well as to OpenGL.
I've already looked at quite a few Noesis samples and documentations and played with the code myself, but I still lack some understanding in various areas. I would definitely like to use the Managed Application Framework from Noesis, as it is very close to the WPF framework.
Maybe you can help me with the following questions to get started:
1. Is there a preferred RenderContext when comparing DirectX11 and OpenGL? It is especially important to have a stable framerate and using VSync. Screen tearing must be avoided at all costs.
2. Where do I have to step into to get the texture into the background. Is this possible at all with the RenderContexts from the Application Framework or do I have to modify/reimplement them?
3) The documentation says that I have to save the GPU state before RenderOffscreen() and restore it afterwards. I must admit that I do not understand what exactly is meant by this. Is there perhaps an example where this is implemented?
Many, many thanks for any help :)
BTW: In the Application Framework for Windows there is the problem that a window that should be maximised at startup (WindowState=Maximized) is not correctly displayed maximized. If you maximize it later (e.g. due to an event) it works correctly. I have already checked the code, but could not find the error quickly.