locked
d3d/xaml swapchain rotation problem

    Question

  • Hi,

    I'm having problems with auto rotation on an Iconia W510 device.

    I am using SwapChainBackgroundPanel and swapChain->SetRotation() to rotate graphics in response to orientation change events, and while it works fine on the simulator, on my actual device it is crapping out big time - graphics are initially OK (for either portrait or landscape initial orientation) but then end up strangely stretched after each subsequent orientation change (sometimes even appear to be slightly sheared) even if I return the device to its initial orientation (where it initially worked OK).

    All width/height vars I can think of peeking look OK and I can't think what else I might be doing wrong - any ideas?

    Bye,
    Mark


    Monday, August 19, 2013 3:59 AM

All replies

  • Ok, possible solution:

    According to this page:

    http://msdn.microsoft.com/en-us/library/windows/apps/hh825871.aspx

    You are supposed to call ISwapChainBackgroundPanelNative->SetSwapChain after calling SwapChain->SetRotation (or after resizing swapchain - but I'm not doing that).

    However, this appears to be what's causing my problem - if I *only* call SetRotation - but not SetSwapChain - it works on both simulator and device.

    Can anyone confirm this is a valid 'fix' and not just a happy fluke?!? This stuff all feels very 'fragile'...

    Bye,
    Mark

    Monday, August 19, 2013 4:13 AM