Wednesday, August 10, 2011

XNA Notes–Day 3

If you want to set a rectangle section of the screen to draw to, set the GrpahicsDevice.ScissorRectangle to a rectange and set the ScissorTestEnable property of the GraphicsDevice.RasterizerState to true.

GraphicsAdapter is used to deal with all the graphic output devices a pc might have (XBox and WP7 only have one), and their characteristics.

GraphicsDevice has a back buffer and uses double buffering. the Present method does the flip, and there are several flip modes

  • .PresentInterval.One (Flips when the display is in vertical retrace phase)
  • PresentInterval.Two (Flips every other vertical retrace)
  • PresentInterval.Immediate (Flips as soon as possible, can cause tearing but good for measuring performance)

GraphicsDevice.SupportedOrientations lets you determine the positions you let the game work in WP7.

No comments:

Post a Comment