Presentation is loading. Please wait.

Presentation is loading. Please wait.

<Border Width="100" Height="100" CornerRadius="5" BorderThickness="10" BorderBrush="Red"> <Image Source="Assets/trees.jpg" Stretch="UniformToFill"/>

Similar presentations


Presentation on theme: "<Border Width="100" Height="100" CornerRadius="5" BorderThickness="10" BorderBrush="Red"> <Image Source="Assets/trees.jpg" Stretch="UniformToFill"/>"— Presentation transcript:

1

2

3

4

5

6

7 <Border Width="100" Height="100" CornerRadius="5" BorderThickness="10" BorderBrush="Red"> <Image Source="Assets/trees.jpg" Stretch="UniformToFill"/>

8

9 C++ Windows 8 subsystem Windows Store app using XAML (C++, C#, VB) App Theme & PVL Direct 3D Direct Write Direct 2D Media Input XAML Framework Windows Runtime / C++

10

11 DirectX XAML

12 DirectX

13 XAML

14 DirectX XAML

15

16

17

18 Object DependencyObject ImageSource SurfaceImageSource ImageBrush^ brush = ref new ImageBrush(); brush->ImageSource = ref new SurfaceImageSource(300, 300); Ellipse1->Fill = brush;

19 SurfaceImageSource interface ISurfaceImageSourceNative { SetDevice(IDXGIDevice *pDevice); BeginDraw( RECT updateRect, IDXGISurface** ppSurface, POINT* pOffset ); EndDraw(); }; : IUnknown These methods must be called from the XAML UI thread

20

21

22 Object DependencyObject ImageSource SurfaceImageSource VirtualSurfaceImageSource DirectX XAML

23 VirtualSurfaceImageSource interface IVirtualSurfaceImageSourceNative: ISurfaceImageSourceNative { RegisterForUpdatesNeeded( IVirtualSurfaceUpdatesCallbackNative *pCallback); GetUpdateRects(RECT *pUpdates, DWORD count); GetUpdateRectCount(DWORD *pCount); Invalidate(RECT updateRect); }; interface IVirtualSurfaceUpdatesCallbackNative: IUnknown { UpdatesNeeded(); };

24

25

26

27 SurfaceImageSource interface ISurfaceImageSourceNativeWithD2D: IUnknown { SetDevice(IUnknown* device); BeginDraw(RECT updateRect, REFIID iid, void **updateObject POINT* offset); EndDraw(); SuspendDraw(); ResumeDraw(); } iid can be either: For using D3D: __uuidof(IDXGISurface)  *updateObject is IDXGISurface For optimized D2D batching: __uuidof(ID2D1DeviceContext)  *updateObject is ID2D1DeviceContext

28

29 SurfaceImageSource interface ISurfaceImageSourceNativeWithD2D: IUnknown { SetDevice(IUnknown* device); BeginDraw(RECT updateRect, REFIID iid, void **updateObject POINT* offset); SuspendDraw(); ResumeDraw(); EndDraw(); } These methods can be freely called from any thread

30

31 DirectX

32

33

34 interface ISwapChainBackgroundPanelNative: IUnknown { SetSwapChain(IDXGISwapChain *pSwapChain); }; SwapChainPanel/SwapChainBackgroundP anel interface ISwapChainPanelNative: IUnknown { SetSwapChain(IDXGISwapChain *pSwapChain); }; (Look familiar?)

35

36

37

38

39

40

41

42

43 SwapChainPanel SwapChainPanel : Grid { // Can be called from any non-UI thread, to create a pipe to receive input on CreateCoreIndependentInputSource(CoreInputDeviceTypes deviceTypes, CoreIndependentInputSource** source); // Events CompositionScaleChanged(); };

44 CoreIndependentInputSource { // Events PointerPressed(…) PointerReleased(…) PointerMoved(…) // Properties Windows.Foundation.Point PointerPosition /*... */ }; CoreIndependentInputSource provides access to all pointer based events and state, when the input is routed to the SwapChainPanel

45

46

47 You can use XAML and DirectX together to create great apps and games Use both swap chain-style and surface-style interop, depending on application needs XAML + DirectX + independent input allows for responsive, custom rendering in XAML apps

48 Session CodeSpeakerTitle 2-164Tim HeuerWhat’s new in XAML? 3-157Kiran KumarXAML Performance Fundamentals 2-047Kam VedBratBuilding games for Windows 2-192Chris AndersonBuilding a UI: What Does It Cost? 4-021Silvana MoncayoDirectComposition: Smooth Composition and Animation for Desktop Applications 4-072Frank OlivierHyper-Fast Web Graphics with OpenGL

49

50 What? Are you interested in having an impact on the future user experiences in Visual Studio? Come help us shape the future. Give us your feedback! When & Where? Schedule a time with us vsdr@microsoft.com vsdr@microsoft.com Room 254 South Moscone, West Mezzanine Level Why? Your input and feedback will influence future Microsoft Visual Studio tools

51

52

53


Download ppt "<Border Width="100" Height="100" CornerRadius="5" BorderThickness="10" BorderBrush="Red"> <Image Source="Assets/trees.jpg" Stretch="UniformToFill"/>"

Similar presentations


Ads by Google