本文整理汇总了C#中Microsoft.Xna.Framework.PreparingDeviceSettingsEventArgs类的典型用法代码示例。如果您正苦于以下问题:C# PreparingDeviceSettingsEventArgs类的具体用法?C# PreparingDeviceSettingsEventArgs怎么用?C# PreparingDeviceSettingsEventArgs使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
PreparingDeviceSettingsEventArgs类属于Microsoft.Xna.Framework命名空间,在下文中一共展示了PreparingDeviceSettingsEventArgs类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: graphics_PreparingDeviceSettings
void graphics_PreparingDeviceSettings(object sender,
PreparingDeviceSettingsEventArgs e)
{
e.GraphicsDeviceInformation.PresentationParameters.DeviceWindowHandle = drawSurface;
}
开发者ID:RaulPB,项目名称:videogames,代码行数:7,代码来源:Game1.cs
示例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;
}
开发者ID:szyszart,项目名称:Junkyard,代码行数:7,代码来源:Game.cs
示例3: CBeroGraphicsDeviceManager_PreparingDeviceSettings
void CBeroGraphicsDeviceManager_PreparingDeviceSettings(object sender, PreparingDeviceSettingsEventArgs e)
{
if (m_WndHndl != IntPtr.Zero)
{
e.GraphicsDeviceInformation.PresentationParameters.DeviceWindowHandle = m_WndHndl;
}
}
开发者ID:DelBero,项目名称:XnaScrap,代码行数:7,代码来源:CBeroGraphicsDeviceManager.cs
示例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;
}
开发者ID:vchelaru,项目名称:FlatRedBall,代码行数:9,代码来源:FlatRedBallGameBase.cs
示例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;
}
开发者ID:PokeD,项目名称:PokeD.SCON,代码行数:9,代码来源:EmptyKeysUI.cs
示例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();
}
开发者ID:GooDer,项目名称:descent,代码行数:10,代码来源:MainGame.cs
示例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;
}
}
开发者ID:JaakkoLipsanen,项目名称:Skypiea,代码行数:11,代码来源:SkypieaGame.cs
示例8: graphics_PreparingDeviceSettings
void graphics_PreparingDeviceSettings(object sender, PreparingDeviceSettingsEventArgs e)
{
try
{
e.GraphicsDeviceInformation.PresentationParameters.PresentationInterval = PresentInterval.Two;
}
catch (Exception ex)
{
Console.WriteLine(ex.Message);
}
}
开发者ID:TyrelBaux,项目名称:Gibbo2D,代码行数:11,代码来源:Game1.cs
示例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;
}
}
开发者ID:GodLesZ,项目名称:svn-dump,代码行数:17,代码来源:Game1.cs
示例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();
}
开发者ID:charbean,项目名称:StrategyClean,代码行数:23,代码来源:StrategyGame.cs
示例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);
}
开发者ID:Imortilize,项目名称:Psynergy-Engine,代码行数:24,代码来源:PsynergyApplication.cs
示例12: _graphics_PreparingDeviceSettings
void _graphics_PreparingDeviceSettings(object sender, PreparingDeviceSettingsEventArgs e)
{
PresentationParameters pp = e.GraphicsDeviceInformation.PresentationParameters;
pp.RenderTargetUsage = RenderTargetUsage.PreserveContents;
e.GraphicsDeviceInformation.PresentationParameters = pp;
}
开发者ID:Gerjo,项目名称:Serious-game,代码行数:6,代码来源:SeriousGame.cs
示例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;
}
开发者ID:Cocos2DXNA,项目名称:Samples,代码行数:11,代码来源:AppDelegate.cs
示例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;
}
开发者ID:CartBlanche,项目名称:cocos2d-xna,代码行数:6,代码来源:CCApplication.cs
示例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;
}
开发者ID:EmptyKeys,项目名称:UI_Examples,代码行数:13,代码来源:Game1.cs
示例16: graphics_PreparingDeviceSettings
void graphics_PreparingDeviceSettings(object sender,
PreparingDeviceSettingsEventArgs e)
{
foreach (Microsoft.Xna.Framework.Graphics.DisplayMode displayMode
in GraphicsAdapter.DefaultAdapter.SupportedDisplayModes)
{
if (displayMode.Width == 800 && displayMode.Height == 600)
{
e.GraphicsDeviceInformation.PresentationParameters.
BackBufferFormat = displayMode.Format;
e.GraphicsDeviceInformation.PresentationParameters.
BackBufferHeight = displayMode.Height;
e.GraphicsDeviceInformation.PresentationParameters.
BackBufferWidth = displayMode.Width;
}
}
}
开发者ID:Moretto-San,项目名称:War,代码行数:17,代码来源:War.cs
示例17: OnPreparingDeviceSettings
protected virtual void OnPreparingDeviceSettings(object sender, PreparingDeviceSettingsEventArgs args)
{
if (this.PreparingDeviceSettings != null)
{
this.PreparingDeviceSettings(sender, args);
}
}
开发者ID:Hayaweh,项目名称:AudioPipe,代码行数:7,代码来源:GraphicsDeviceManager.cs
示例18: GraphicsDevicePreparingDeviceSettings
private void GraphicsDevicePreparingDeviceSettings(object sender, PreparingDeviceSettingsEventArgs e)
{
e.GraphicsDeviceInformation.PresentationParameters.RenderTargetUsage = RenderTargetUsage.PreserveContents;
}
开发者ID:kira333,项目名称:MyProjects,代码行数:4,代码来源:MainGame.cs
示例19: graphics_PreparingDeviceSettings
/// <summary>
/// Event capturing the construction of a draw surface and makes sure this gets redirected to
/// a predesignated drawsurface marked by pointer _drawSurface
/// </summary>
private void graphics_PreparingDeviceSettings(object sender, PreparingDeviceSettingsEventArgs e)
{
e.GraphicsDeviceInformation.PresentationParameters.DeviceWindowHandle = this._drawSurface;
e.GraphicsDeviceInformation.PresentationParameters.BackBufferWidth = Simulation3D.Form.pictureBoxSurface.Width;
e.GraphicsDeviceInformation.PresentationParameters.BackBufferHeight = Simulation3D.Form.pictureBoxSurface.Height;
}
开发者ID:intruder01,项目名称:20150105,代码行数:11,代码来源:Simulation3DEngine.cs
示例20: OnGraphicsDevicePrepareSettings
/// <summary>
/// When a graphics device is being created, we need to ensure swap effect copy is enabled
/// so that the contents of the back buffer are not lost after multiple present calls.
/// </summary>
protected virtual void OnGraphicsDevicePrepareSettings(object sender, PreparingDeviceSettingsEventArgs e)
{
e.GraphicsDeviceInformation.PresentationParameters.SwapEffect = SwapEffect.Copy;
}
开发者ID:Homergdog,项目名称:eqinterfacearchitect,代码行数:8,代码来源:WpfGame.cs
注:本文中的Microsoft.Xna.Framework.PreparingDeviceSettingsEventArgs类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论