本文整理汇总了C#中Microsoft.Xna.Framework.PreparingDeviceSettingsEventArgs类的典型用法代码示例。如果您正苦于以下问题:C# PreparingDeviceSettingsEventArgs类的具体用法?C# PreparingDeviceSettingsEventArgs怎么用?C# PreparingDeviceSettingsEventArgs使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
PreparingDeviceSettingsEventArgs类属于Microsoft.Xna.Framework命名空间,在下文中一共展示了PreparingDeviceSettingsEventArgs类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: graphics_PreparingDeviceSettings
void graphics_PreparingDeviceSettings(object sender,
PreparingDeviceSettingsEventArgs e)
{
e.GraphicsDeviceInformation.PresentationParameters.DeviceWindowHandle = drawSurface;
}
示例2: graphics_PreparingDeviceSettings
private void graphics_PreparingDeviceSettings(object sender, PreparingDeviceSettingsEventArgs e)
{
DisplayMode displayMode = GraphicsAdapter.DefaultAdapter.CurrentDisplayMode;
e.GraphicsDeviceInformation.PresentationParameters.BackBufferFormat = displayMode.Format;
e.GraphicsDeviceInformation.PresentationParameters.BackBufferWidth = displayMode.Width;
e.GraphicsDeviceInformation.PresentationParameters.BackBufferHeight = displayMode.Height;
}
示例3: CBeroGraphicsDeviceManager_PreparingDeviceSettings
void CBeroGraphicsDeviceManager_PreparingDeviceSettings(object sender, PreparingDeviceSettingsEventArgs e)
{
if (m_WndHndl != IntPtr.Zero)
{
e.GraphicsDeviceInformation.PresentationParameters.DeviceWindowHandle = m_WndHndl;
}
}
示例4: PreparingDeviceSettings
private void PreparingDeviceSettings(object sender, PreparingDeviceSettingsEventArgs e)
{
PresentationParameters presentationParams = e.GraphicsDeviceInformation.PresentationParameters;
presentationParams.BackBufferWidth = RenderWidth;
presentationParams.BackBufferHeight = RenderHeight;
presentationParams.DeviceWindowHandle = _windowHandle;
presentationParams.RenderTargetUsage = RenderTargetUsage.PreserveContents;
}
示例5: Graphics_PreparingDeviceSettings
private void Graphics_PreparingDeviceSettings(object sender, PreparingDeviceSettingsEventArgs e)
{
Graphics.PreferredBackBufferWidth = DefaultResolution.X;
Graphics.PreferredBackBufferHeight = DefaultResolution.Y;
//Graphics.GraphicsProfile = GraphicsProfile.HiDef;
Graphics.SynchronizeWithVerticalRetrace = true;
//Graphics.PreferredDepthStencilFormat = DepthFormat.Depth24Stencil8;
}
示例6: graphics_PreparingDeviceSettings
private void graphics_PreparingDeviceSettings(object sender, PreparingDeviceSettingsEventArgs e)
{
//graphics.IsFullScreen = true;
graphics.PreferredBackBufferWidth = 1280;
graphics.PreferredBackBufferHeight = 720;
graphics.PreferMultiSampling = true;
graphics.GraphicsProfile = GraphicsProfile.HiDef;
graphics.PreferredDepthStencilFormat = DepthFormat.Depth24Stencil8;
graphics.ApplyChanges();
}
示例7: OnPreparingDeviceSettings
protected override void OnPreparingDeviceSettings(object sender, PreparingDeviceSettingsEventArgs e)
{
e.GraphicsDeviceInformation.PresentationParameters.PresentationInterval = PresentInterval.One;
// use 4-bit (per channel) color format for WP7. Atleast Omnia 7 has a horrible banding with SurfaceFormat.Color.
// Lumia's don't probably have but whatever
if (OperatingSystemHelper.Version == WindowsPhoneVersion.WP7)
{
e.GraphicsDeviceInformation.PresentationParameters.BackBufferFormat = SurfaceFormat.Bgra4444;
}
}
示例8: graphics_PreparingDeviceSettings
void graphics_PreparingDeviceSettings(object sender, PreparingDeviceSettingsEventArgs e)
{
try
{
e.GraphicsDeviceInformation.PresentationParameters.PresentationInterval = PresentInterval.Two;
}
catch (Exception ex)
{
Console.WriteLine(ex.Message);
}
}
示例9: GraphicsPreparingDeviceSettings
private void GraphicsPreparingDeviceSettings(object sender, PreparingDeviceSettingsEventArgs e) {
var pp = e.GraphicsDeviceInformation.PresentationParameters;
var adapter = e.GraphicsDeviceInformation.Adapter;
var dispFormat = adapter.CurrentDisplayMode.Format;
var dephFormat = pp.DepthStencilFormat;
SurfaceFormat selectedFormat;
DepthFormat selectedDepthFormat;
int selectedMultiSampleCount;
if (adapter.QueryRenderTargetFormat(GraphicsProfile.HiDef, dispFormat, dephFormat, 4, out selectedFormat, out selectedDepthFormat, out selectedMultiSampleCount)) {
pp.MultiSampleCount = 4;
} else if (adapter.QueryRenderTargetFormat(GraphicsProfile.HiDef, dispFormat, dephFormat, 2, out selectedFormat, out selectedDepthFormat, out selectedMultiSampleCount)) {
pp.MultiSampleCount = 2;
}
}
示例10: graphics_PreparingDeviceSettings
private void graphics_PreparingDeviceSettings(object sender, PreparingDeviceSettingsEventArgs e)
{
nativeScreenWidth = graphics.PreferredBackBufferWidth;
nativeScreenHeight = graphics.PreferredBackBufferHeight;
if (nativeScreenWidth == 1920)
{
graphics.PreferredBackBufferWidth = 1920;
graphics.PreferredBackBufferHeight = 1080;
}
else
{
//graphics.PreferredBackBufferWidth = 1920;
//graphics.PreferredBackBufferHeight = 1080;
graphics.PreferredBackBufferWidth = 1280;
graphics.PreferredBackBufferHeight = 720;
//graphics.IsFullScreen = true;
}
graphics.PreferMultiSampling = true;
graphics.PreferredDepthStencilFormat = DepthFormat.Depth24Stencil8;
graphics.ApplyChanges();
}
示例11: InitialiseDevice
private void InitialiseDevice(object sender, PreparingDeviceSettingsEventArgs e)
{
PresentationParameters pp =
e.GraphicsDeviceInformation.PresentationParameters;
foreach (GraphicsAdapter adapter in GraphicsAdapter.Adapters)
{
if (adapter.Description.Contains("NVIDIA PerfHUD"))
{
GraphicsAdapter.UseReferenceDevice = true;
e.GraphicsDeviceInformation.Adapter = adapter;
break;
}
}
GraphicsAdapter defaultAdapter = GraphicsAdapter.DefaultAdapter;
//if ( defaultAdapter.IsWideScreen )
RenderManager.Instance.BaseResolution = new Vector2(1280, 720);
// else
// RenderManager.Instance.BaseResolution = new Vector2(1024, 768);
}
示例12: _graphics_PreparingDeviceSettings
void _graphics_PreparingDeviceSettings(object sender, PreparingDeviceSettingsEventArgs e)
{
PresentationParameters pp = e.GraphicsDeviceInformation.PresentationParameters;
pp.RenderTargetUsage = RenderTargetUsage.PreserveContents;
e.GraphicsDeviceInformation.PresentationParameters = pp;
}
示例13: GraphicsPreparingDeviceSettings
/// <summary>
/// We need to override this device settings callback so that the correct back buffer it set.
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected override void GraphicsPreparingDeviceSettings(object sender, PreparingDeviceSettingsEventArgs e)
{
base.GraphicsPreparingDeviceSettings(sender, e);
// e.GraphicsDeviceInformation.PresentationParameters.BackBufferHeight = 960;
// e.GraphicsDeviceInformation.PresentationParameters.BackBufferWidth = 800;
}
示例14: GraphicsPreparingDeviceSettings
protected virtual void GraphicsPreparingDeviceSettings(object sender, PreparingDeviceSettingsEventArgs e)
{
e.GraphicsDeviceInformation.PresentationParameters.RenderTargetUsage = RenderTargetUsage.PreserveContents;
e.GraphicsDeviceInformation.PresentationParameters.DepthStencilFormat = DepthFormat.Depth24Stencil8;
e.GraphicsDeviceInformation.PresentationParameters.BackBufferFormat = SurfaceFormat.Color;
}
示例15: graphics_PreparingDeviceSettings
private void graphics_PreparingDeviceSettings(object sender, PreparingDeviceSettingsEventArgs e)
{
nativeScreenWidth = graphics.PreferredBackBufferWidth;
nativeScreenHeight = graphics.PreferredBackBufferHeight;
graphics.PreferredBackBufferWidth = 1280;
graphics.PreferredBackBufferHeight = 720;
graphics.PreferMultiSampling = true;
graphics.GraphicsProfile = GraphicsProfile.HiDef;
graphics.SynchronizeWithVerticalRetrace = true;
graphics.PreferredDepthStencilFormat = DepthFormat.Depth24Stencil8;
e.GraphicsDeviceInformation.PresentationParameters.MultiSampleCount = 16;
}