History: Mogre and WPF
Preview of version: 6
WPF
WPF is a modern SDK created by Microsoft for building GUIs in Windows. Many powerful Windows applications today, including Visual Studio 2010 and later, are built using WPF. WPF makes it easy to create sophisticated GUI controls that are composed of other controls. It also has support for animation, styling, and data binding. It optionally supports a declarative UI layout through a XML format called XAML.
UI toolkits for games are often simpler and less featureful than desktop-grade UI toolkits. Incorporating WPF into a Mogre application allows a developer to have a sophisticated UI and leverage the vast wealth of WPF resources available.
Methods of Combining WPF and Mogre
There are several ways of using WPF and Mogre together. Note that most are in an experimental state.
Mogre In WPF
WPF comes with D3DImage, which shows a D3D texture inside WPF. Mogre can render to this D3D texture.
Pros:
- The executable is a WPF application, with all WPF features supported.
- ...
Cons:
- ...
Subapproaches:
- Single vs Double buffering
- Render Timing
- CompositionTarget.Rendering event
- DispatcherInactive event
- DispatcherTimer
- Timer
- Loop
WPF in Mogre
Take a screenshot of individual WPF visuals, and render them as textures onto entities in Ogre or Mogre.
Pros:
- ...
Cons:
- It is up to you to arrange widgets and program interactivity with WPF elements.
- No interactive open source implementation is known.
WPF on Mogre
Pros:
- Mogre Rendering rate is not constrained to WPF rendering, as it is in the 'Mogre In WPF' approach.
Cons:
- It can be tricky to keep two windows in sync, with input working nicely between the two.
Interaction with Mogre
... how interaction works (Add both ways, which was describes by Hormis) ...
Example projects
... List the currently existing projects here (including link) and add a short description ...
See also
Further information
- forum link 1
- forum link 2
GUI alternatives