views:

819

answers:

1

I am currently developing a 3d game using C#/SlimDX (The target is Direct3D 9). I've been looking for a suitable Game UI toolkit for a while, but I was unable to make up my mind.

The Game UI will be for a roleplaying game, so it'll be fairly complex and will involve quite a few controls (text boxes, inventory grids, list boxes, select boxes, scrollable areas, etc.).

I previously (When i was still using C++/OpenGL) looked at GameSWF and very much liked the idea, but for my current game it's out of the question.

Does anyone know a good GUI toolkit for use with SlimDX?

I would be especially interested in using WPF/Silverlight for this, since there are good IDEs available for both. But a quick google search didn't reveal any information on embedding these.

+2  A: 

You can use WPF (but not Silverlight) for this.

The way to go about this is to use SlimDX in conjunction with D3DImage. You then let WPF handle all of your final composition, including overlaying the WPF UI over the top of your SlimDX scene.

SlimDX basically just renders to a brush in this situation, which can be used on any WPF element. (This doesn't work for Silverlight, as Sliverlight doesn't support D3DImage.)

Reed Copsey
Hi,is it still possible to use FullScreen Direct3D?And what is the performance hit for the main scene for this?
Storm
Well, it does work, fairly well. There is a performance hit, but the main thing is that you have to let WPF handle the compositing, which means you're working at WPF's framerate instead of yours - kind of like having vsync on. The biggest hit comes from having to have D3D_MULTITHREADED on and working in a window instead of direct, though, in terms of your D3D calls. That being said, we've been doing this, and been very happy. You can make a window fullscreen in WPF fairly easily, though. Unfortunately, this is the only way to directly use WPF for your UI.
Reed Copsey
Without this type of approach, you'll have airspace issues with WPF.
Reed Copsey