From 7bc2a4a3400352e42e3fb6d404d7b8d3c28d6303 Mon Sep 17 00:00:00 2001 From: Glatzemann Date: Mon, 5 Dec 2011 10:00:33 +0000 Subject: [PATCH] updated samples to test some features --- Samples/SimpleSprite/Game1.cs | 14 ++++++++------ Samples/TextRendering/Game1.cs | 7 ++++--- Samples/TextRendering/TextRendering.csproj | 4 ++++ 3 files changed, 16 insertions(+), 9 deletions(-) diff --git a/Samples/SimpleSprite/Game1.cs b/Samples/SimpleSprite/Game1.cs index 5f43357e..7e144467 100644 --- a/Samples/SimpleSprite/Game1.cs +++ b/Samples/SimpleSprite/Game1.cs @@ -77,12 +77,19 @@ namespace WindowsGame1 private int lastFps = 60; public Game1() - : base("OpenGL3") + : base("DirectX10") { graphics = new GraphicsDeviceManager(this); + graphics.PreparingDeviceSettings += new EventHandler(graphics_PreparingDeviceSettings); Content.RootDirectory = "SampleContent"; } + void graphics_PreparingDeviceSettings(object sender, PreparingDeviceSettingsEventArgs e) + { + e.GraphicsDeviceInformation.PresentationParameters.BackBufferWidth = 800; + e.GraphicsDeviceInformation.PresentationParameters.BackBufferHeight = 600; + } + /// /// Allows the game to perform any initialization it needs to before starting to run. /// This is where it can query for any required services and load any non-graphic @@ -91,11 +98,6 @@ namespace WindowsGame1 /// protected override void Initialize() { - //TODO: currently not working in OpenGL3 - //graphics.PreferredBackBufferWidth = 800; - //graphics.PreferredBackBufferHeight = 600; - //graphics.ApplyChanges(); - base.Initialize(); } diff --git a/Samples/TextRendering/Game1.cs b/Samples/TextRendering/Game1.cs index f9eacfe9..9ba98ff6 100644 --- a/Samples/TextRendering/Game1.cs +++ b/Samples/TextRendering/Game1.cs @@ -65,6 +65,7 @@ namespace TextRendering SpriteFont debugFont; public Game1() + : base("OpenGL3") { graphics = new GraphicsDeviceManager(this); Content.RootDirectory = "SampleContent"; @@ -72,9 +73,9 @@ namespace TextRendering protected override void Initialize() { - GraphicsDevice.PresentationParameters.BackBufferWidth = 1280; - GraphicsDevice.PresentationParameters.BackBufferHeight = 720; - GraphicsDevice.Reset(); + //GraphicsDevice.PresentationParameters.BackBufferWidth = 1280; + //GraphicsDevice.PresentationParameters.BackBufferHeight = 720; + //GraphicsDevice.Reset(); base.Initialize(); } diff --git a/Samples/TextRendering/TextRendering.csproj b/Samples/TextRendering/TextRendering.csproj index 4b4077a4..48c01be5 100644 --- a/Samples/TextRendering/TextRendering.csproj +++ b/Samples/TextRendering/TextRendering.csproj @@ -91,6 +91,10 @@ {5BE49183-2F6F-4527-AC90-D816911FCF90} ANX.Framework.Windows.DX10 + + {EB8258E0-6741-4DB9-B756-1EBDF67B1ED6} + ANX.Framework.Windows.GL3 + {6A582788-C4D2-410C-96CD-177F75712D65} ANX.SoundSystem.Windows.XAudio