Show More
Commit Description:
Add missing component and message.
Commit Description:
Add missing component and message.
File last commit:
Show/Diff file:
Action:
FNA/src/Graphics/PresentationParameters.cs
195 lines | 3.4 KiB | text/x-csharp | CSharpLexer
Early working version (including all dependencies, lol).
r0 #region License
/* FNA - XNA4 Reimplementation for Desktop Platforms
Upgrade FNA to 22.12...
r690 * Copyright 2009-2022 Ethan Lee and the MonoGame Team
Early working version (including all dependencies, lol).
r0 *
* Released under the Microsoft Public License.
* See LICENSE for details.
*/
#endregion
#region Using Statements
using System;
#endregion
namespace Microsoft.Xna.Framework.Graphics
{
[Serializable]
public class PresentationParameters
{
#region Public Properties
public SurfaceFormat BackBufferFormat
{
Upgrade FNA to 22.12...
r690 get
{
return parameters.backBufferFormat;
}
set
{
parameters.backBufferFormat = value;
}
Early working version (including all dependencies, lol).
r0 }
public int BackBufferHeight
{
Upgrade FNA to 22.12...
r690 get
{
return parameters.backBufferHeight;
}
set
{
parameters.backBufferHeight = value;
}
Early working version (including all dependencies, lol).
r0 }
public int BackBufferWidth
{
Upgrade FNA to 22.12...
r690 get
{
return parameters.backBufferWidth;
}
set
{
parameters.backBufferWidth = value;
}
Early working version (including all dependencies, lol).
r0 }
public Rectangle Bounds
{
get
{
return new Rectangle(0, 0, BackBufferWidth, BackBufferHeight);
}
}
public IntPtr DeviceWindowHandle
{
Upgrade FNA to 22.12...
r690 get
{
return parameters.deviceWindowHandle;
}
set
{
parameters.deviceWindowHandle = value;
}
Early working version (including all dependencies, lol).
r0 }
public DepthFormat DepthStencilFormat
{
Upgrade FNA to 22.12...
r690 get
{
return parameters.depthStencilFormat;
}
set
{
parameters.depthStencilFormat = value;
}
Early working version (including all dependencies, lol).
r0 }
public bool IsFullScreen
{
Upgrade FNA to 22.12...
r690 get
{
return parameters.isFullScreen == 1;
}
set
{
parameters.isFullScreen = (byte) (value ? 1 : 0);
}
Early working version (including all dependencies, lol).
r0 }
public int MultiSampleCount
{
Upgrade FNA to 22.12...
r690 get
{
return parameters.multiSampleCount;
}
set
{
parameters.multiSampleCount = value;
}
Early working version (including all dependencies, lol).
r0 }
public PresentInterval PresentationInterval
{
Upgrade FNA to 22.12...
r690 get
{
return parameters.presentationInterval;
}
set
{
parameters.presentationInterval = value;
}
Early working version (including all dependencies, lol).
r0 }
public DisplayOrientation DisplayOrientation
{
Upgrade FNA to 22.12...
r690 get
{
return parameters.displayOrientation;
}
set
{
parameters.displayOrientation = value;
}
Early working version (including all dependencies, lol).
r0 }
public RenderTargetUsage RenderTargetUsage
{
Upgrade FNA to 22.12...
r690 get
{
return parameters.renderTargetUsage;
}
set
{
parameters.renderTargetUsage = value;
}
Early working version (including all dependencies, lol).
r0 }
#endregion
Upgrade FNA to 22.12...
r690 #region Internal FNA3D Variables
internal FNA3D.FNA3D_PresentationParameters parameters;
#endregion
Early working version (including all dependencies, lol).
r0 #region Public Constructors
public PresentationParameters()
{
BackBufferFormat = SurfaceFormat.Color;
BackBufferWidth = GraphicsDeviceManager.DefaultBackBufferWidth;
BackBufferHeight = GraphicsDeviceManager.DefaultBackBufferHeight;
DeviceWindowHandle = IntPtr.Zero;
IsFullScreen = false; // FIXME: Is this the default?
DepthStencilFormat = DepthFormat.None;
MultiSampleCount = 0;
PresentationInterval = PresentInterval.Default;
DisplayOrientation = DisplayOrientation.Default;
RenderTargetUsage = RenderTargetUsage.DiscardContents;
}
#endregion
#region Public Methods
public PresentationParameters Clone()
{
PresentationParameters clone = new PresentationParameters();
clone.BackBufferFormat = BackBufferFormat;
clone.BackBufferHeight = BackBufferHeight;
clone.BackBufferWidth = BackBufferWidth;
clone.DeviceWindowHandle = DeviceWindowHandle;
clone.IsFullScreen = IsFullScreen;
clone.DepthStencilFormat = DepthStencilFormat;
clone.MultiSampleCount = MultiSampleCount;
clone.PresentationInterval = PresentationInterval;
clone.DisplayOrientation = DisplayOrientation;
clone.RenderTargetUsage = RenderTargetUsage;
return clone;
}
#endregion
}
}