We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 2782 - WinRT: allow SDL_Window instances to be associated with XAML controls
Summary: WinRT: allow SDL_Window instances to be associated with XAML controls
Status: ASSIGNED
Alias: None
Product: SDL
Classification: Unclassified
Component: video (show other bugs)
Version: HG 2.0
Hardware: x86 Other
: P2 normal
Assignee: David Ludwig
QA Contact: David Ludwig
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-11-13 18:50 UTC by David Ludwig
Modified: 2014-11-13 21:44 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David Ludwig 2014-11-13 18:50:40 UTC
WinRT features a new UI framework known as XAML, which allows some level of integration with Direct3D-based content.  These are typically done through a series of UI controls, which provide varying levels of access to Direct3D 11 swap chains.  These controls must be used if Direct3D-based content is to be mixed with other XAML controls.

SDL/WinRT is, as of this writing, based around a non-XAML-using WinRT app type referred to as either a 'Direct3D App' or a 'CoreWindow based app'.  This app type is in many ways simpler than a XAML app (and arguably easier to integrate SDL with), but does not allow for XAML controls to be used (in the app).

TODO: allow SDL_Window instances to be created with appropriate XAML controls.  At minimum, this should probably be the SwapChainPanel control (available on Windows 8.1 and Windows Phone 8.1), and perhaps SwapChainBackgroundPanel as well (deprecated in WinRT, but available on Windows 8.0).  Make sure that common events are received from the XAML control(s) and pushed onto the SDL event queue, as appropriate and possible (given any potential constraints with the XAML framework).

To note, SDL_main-based apps may require execution on a separate thread, as the XAML framework does not appear to offer an analogue for SDL_PumpEvents() (whereas Direct3D/CoreWindow apps do).

Also note, some experimental, proof-of-concept support exists in SDL/WinRT for SwapChainBackgroundPanel, however it is buggy, with most input event types not being supported, and with major performance issues.  Many SDL APIs do not work with it either, such as SDL_CreateWindowFrom.