Question about Xenko Editor Rendering

Hello everyone, I’m really only dropping in here because I have a question about the internals of Xenko. I’m to understand that Xenko uses WPF for its editor. Now, does this also extend to its actual 3D editor? Is the 3D editor using the 3D functionality of WPF, or is it deferring the rendering of the viewport to a third party framework, and if so, what framework? Can they still draw WPF controls over the editor using that framework?

Thanks for the clarity.

Hi,

The 3D view port in Xenko Game Studio is the game engine rendering to a child window using Direct3D. You cannot use WPF stuff in/on-top of it.

cheers,
dfkeenan

Hey, thanks so much for the response. Can you verify if they’re using D3DImage for displaying their Direct3D scenes?

No it is not. It is using a child window. I think this class is used to manage hosting the child window:

https://github.com/xenko3d/xenko/blob/master/sources/presentation/Xenko.Core.Presentation/Controls/GameEngineHost.cs

I am not certain if all parts use this.

You can, fork/download the engine/editor source code and look for yourself.

Ah, ok. Thanks. I’m curious as to why they didn’t, and are not using D3DImage, now though. It would allow them to use WPF within the editor itself. D3DImage would cure the airspace problems of their current implementation, as well as add the ability to make in game UI’s by using WPF.

Interesting.

D3DImage like the rest of WPF is Direct3D 9 based. Xenko supports rendering platforms Direct3D 11, Direct3D 12, OpenGL and Vulkan. While I believe it is technically possible to share a surface between D3D9 and D3D11 it is not very performant and not without it’s issues. And you would not be able to interop if you were using OpenGL or Vulkan as your render platform.

1 Like

Ah, ok. I guess that explains it then. Thank you so much for the information. I’ve been writing a game engine for a few years now, and about 2 years ago updated the editor to WPF. I decided a few days ago that I should look into fully incorporating Direct3D, instead of OpenGL and OpenTK. Just straight up WPF 3D appears to be too slow for my needs, unfortunately. The idea was to be able to use WPF for the in game UI as well.

I think now that I’ve taken time to personally research all of this, I’m probably just going to stick to my current implementation. Too much to lose, for too little gain.

Thanks again. You’ve really assisted me.