updated samples to test some features

This commit is contained in:
Glatzemann 2011-12-05 10:00:33 +00:00
parent 72f8e735fb
commit 7bc2a4a340
3 changed files with 16 additions and 9 deletions

View File

@ -77,12 +77,19 @@ namespace WindowsGame1
private int lastFps = 60;
public Game1()
: base("OpenGL3")
: base("DirectX10")
{
graphics = new GraphicsDeviceManager(this);
graphics.PreparingDeviceSettings += new EventHandler<PreparingDeviceSettingsEventArgs>(graphics_PreparingDeviceSettings);
Content.RootDirectory = "SampleContent";
}
void graphics_PreparingDeviceSettings(object sender, PreparingDeviceSettingsEventArgs e)
{
e.GraphicsDeviceInformation.PresentationParameters.BackBufferWidth = 800;
e.GraphicsDeviceInformation.PresentationParameters.BackBufferHeight = 600;
}
/// <summary>
/// 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
/// </summary>
protected override void Initialize()
{
//TODO: currently not working in OpenGL3
//graphics.PreferredBackBufferWidth = 800;
//graphics.PreferredBackBufferHeight = 600;
//graphics.ApplyChanges();
base.Initialize();
}

View File

@ -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();
}

View File

@ -91,6 +91,10 @@
<Project>{5BE49183-2F6F-4527-AC90-D816911FCF90}</Project>
<Name>ANX.Framework.Windows.DX10</Name>
</ProjectReference>
<ProjectReference Include="..\..\RenderSystems\ANX.Framework.Windows.GL3\ANX.Framework.Windows.GL3.csproj">
<Project>{EB8258E0-6741-4DB9-B756-1EBDF67B1ED6}</Project>
<Name>ANX.Framework.Windows.GL3</Name>
</ProjectReference>
<ProjectReference Include="..\..\SoundSystems\ANX.SoundSystem.Windows.XAudio\ANX.SoundSystem.Windows.XAudio.csproj">
<Project>{6A582788-C4D2-410C-96CD-177F75712D65}</Project>
<Name>ANX.SoundSystem.Windows.XAudio</Name>