- removed some testing code from SimpleSprite sample

This commit is contained in:
Glatzemann 2011-12-02 13:01:57 +00:00
parent 122714af92
commit 8cc8742f45
3 changed files with 5 additions and 10 deletions

View File

@ -269,6 +269,7 @@ namespace ANX.Framework.Windows.DX10
// Prepare All the stages
device.InputAssembler.PrimitiveTopology = FormatConverter.Translate(primitiveType);
device.Rasterizer.SetViewports(currentViewport);
device.OutputMerger.SetTargets(this.depthStencilView, this.renderView);
for (int i = 0; i < technique.Description.PassCount; ++i)
@ -468,8 +469,9 @@ namespace ANX.Framework.Windows.DX10
renderTargetView.Dispose();
renderTargetView = null;
}
device.OutputMerger.SetRenderTargets(1, new RenderTargetView[] { this.renderView }, this.depthStencilView);
device.OutputMerger.SetTargets(this.depthStencilView, this.renderView);
}
else
{

View File

@ -81,14 +81,6 @@ namespace WindowsGame1
{
graphics = new GraphicsDeviceManager(this);
Content.RootDirectory = "SampleContent";
graphics.PreparingDeviceSettings += new EventHandler<PreparingDeviceSettingsEventArgs>(graphics_PreparingDeviceSettings);
}
void graphics_PreparingDeviceSettings(object sender, PreparingDeviceSettingsEventArgs e)
{
e.GraphicsDeviceInformation.PresentationParameters.DepthStencilFormat = DepthFormat.None;
e.GraphicsDeviceInformation.PresentationParameters.BackBufferFormat = SurfaceFormat.Bgr565;
}
/// <summary>

View File

@ -119,7 +119,8 @@ namespace VertexIndexBuffer
protected override void Draw(GameTime gameTime)
{
GraphicsDevice.Clear(Color.CornflowerBlue);
//GraphicsDevice.Clear(Color.CornflowerBlue);
GraphicsDevice.Clear(ClearOptions.Target | ClearOptions.DepthBuffer | ClearOptions.Stencil, Color.CornflowerBlue, 1.0f, 0);
miniTriEffect.CurrentTechnique.Passes[0].Apply();