forked from MonoGame/MonoGame
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGraphicsDeviceManager.WinRT.cs
33 lines (29 loc) · 1.07 KB
/
GraphicsDeviceManager.WinRT.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
// MonoGame - Copyright (C) The MonoGame Team
// This file is subject to the terms and conditions defined in
// file 'LICENSE.txt', which is part of this source code package.
using System;
using Microsoft.Xna.Framework.Graphics;
using Windows.UI.Xaml.Controls;
namespace Microsoft.Xna.Framework
{
partial class GraphicsDeviceManager
{
[CLSCompliant(false)]
public SwapChainPanel SwapChainPanel { get; set; }
partial void PlatformPreparePresentationParameters(PresentationParameters presentationParameters)
{
// The graphics device can use a XAML panel or a window
// to created the default swapchain target.
if (SwapChainPanel != null)
{
presentationParameters.DeviceWindowHandle = IntPtr.Zero;
presentationParameters.SwapChainPanel = this.SwapChainPanel;
}
else
{
presentationParameters.DeviceWindowHandle = _game.Window.Handle;
presentationParameters.SwapChainPanel = null;
}
}
}
}