Développement XNA pour la XBox et le PC
268
Premier dessin d’une forme
public class Chapitre12 : Microsoft.Xna.Framework.Game
{
GraphicsDeviceManager graphics;
SpriteBatch spriteBatch;
Matrix projection;
Matrix view;
Vector3 cameraPosition = new Vector3(0, 0, 3);
Vector3 cameraTarget = Vector3.Zero;
Vector3 cameraUpVector = Vector3.Up;
VertexPositionColor[] vertices;
public Chapitre12()
{
graphics = new GraphicsDeviceManager(this);
Content.RootDirectory = "Content";
}
protected override void Initialize()
{
float aspectRatio = graphics.GraphicsDevice.Viewport.Width /
➥graphics.GraphicsDevice.Viewport.Height;
Figure 12-11
Le dessin d’une première forme
=Labat FM.book Page 268 Vendredi, 19. juin 2009 4:01 16
268
Premier dessin d’une forme
public class Chapitre12 : Microsoft.Xna.Framework.Game
{
GraphicsDeviceManager graphics;
SpriteBatch spriteBatch;
Matrix projection;
Matrix view;
Vector3 cameraPosition = new Vector3(0, 0, 3);
Vector3 cameraTarget = Vector3.Zero;
Vector3 cameraUpVector = Vector3.Up;
VertexPositionColor[] vertices;
public Chapitre12()
{
graphics = new GraphicsDeviceManager(this);
Content.RootDirectory = "Content";
}
protected override void Initialize()
{
float aspectRatio = graphics.GraphicsDevice.Viewport.Width /
➥graphics.GraphicsDevice.Viewport.Height;
Figure 12-11
Le dessin d’une première forme
=Labat FM.book Page 268 Vendredi, 19. juin 2009 4:01 16
