-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Allow embedding into Perspex #6
Comments
This should be pretty straightforward as Perspex uses DirectX11 (DIrect2D) for its drawing already and currently also draws on the UI thread. One way to do this would be to add a hook added to the Perspex.Direct2D1.Renderer class which would pass the SharpDX.Direct2D1.RenderTarget. In this way DirectX would be able to draw where it wanted. Another way would be to add something like a D3DImage class to Perspex.Direct2D1 which draws to an intermediate render target, and the is composited by Perspex.Direct2D1.Renderer. If you would like to have a go, feel free to fork and play! Otherwise I will look into adding something like this soon. |
Yes thanks, i would use perspex for cross platform editor ui for my game engine and this is quite important, thanks again |
Note that would be good to have the possibility to embed OpenGL rendering even on Windows, so user can render OpenGL on Direct2D. |
One thought: if you're using it for a game engine, wouldn't it be more useful if Perspex could draw into your DirectX render target? |
Yes, I can try to achieve some stuff and maybe report back. |
I've looked into this a little, but I could use some input on how you would like it to be used.
|
This is something I experiment with, probably need to think almost all ways, you can add D3DImage like where the Anyway wouldn't be better to go with GTK 3 instead of GTK 2, MonoDevelop started migration to GTK 3. What do you think? |
Re: GTK3 - please start a new issue! |
This is completely the wrong place for this (although there is some loose connection to D3D), but just wanted to say, Perspex looks awesome! I've been wondering if I'll ever be able to make my Gemini framework cross-platform, and this is probably the most promising potential solution I've seen. I will be watching your progress with interest. |
Thanks Tim, yes completely the wrong place, but please come join us in our gitter room! https://gitter.im/grokys/Perspex |
opengl and native program embedding is now merged. |
* NameDirectiveTransformer.cs * Build-time diagnostics
I would like to embed my DirectX11 rendering widget inside the application, in WPF is done using D3DImage or WindowsForms host using interop, how would this be possible here?
Same logic goes on GTK with OpenGL.
The text was updated successfully, but these errors were encountered: