diff --git a/TGC.MonoGame.TP/Content/Models/tgc-logo/tgc-logo.fbx b/TGC.MonoGame.TP/Content/Models/tgc-logo/tgc-logo.fbx index c8f1e9a3d..6f066d809 100644 --- a/TGC.MonoGame.TP/Content/Models/tgc-logo/tgc-logo.fbx +++ b/TGC.MonoGame.TP/Content/Models/tgc-logo/tgc-logo.fbx @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:fdbf27e227a1554da9653bee09022aa6d72978a971c6390f631e3e4c75c98cfe -size 386333 +oid sha256:af84a6d4a433db8f49c3895d534e37aacddf68b27f9611856e76a6052562fe3f +size 4751036 diff --git a/TGC.MonoGame.TP/TGCGame.cs b/TGC.MonoGame.TP/TGCGame.cs index 9dc2241d4..6a06032dc 100644 --- a/TGC.MonoGame.TP/TGCGame.cs +++ b/TGC.MonoGame.TP/TGCGame.cs @@ -26,6 +26,10 @@ public TGCGame() { // Maneja la configuracion y la administracion del dispositivo grafico. Graphics = new GraphicsDeviceManager(this); + + Graphics.PreferredBackBufferWidth = GraphicsAdapter.DefaultAdapter.CurrentDisplayMode.Width - 100; + Graphics.PreferredBackBufferHeight = GraphicsAdapter.DefaultAdapter.CurrentDisplayMode.Height - 100; + // Para que el juego sea pantalla completa se puede usar Graphics IsFullScreen. // Carpeta raiz donde va a estar toda la Media. Content.RootDirectory = "Content"; @@ -113,10 +117,12 @@ protected override void Update(GameTime gameTime) //Salgo del juego. Exit(); } - + // Basado en el tiempo que paso se va generando una rotacion. Rotation += Convert.ToSingle(gameTime.ElapsedGameTime.TotalSeconds); + World = Matrix.CreateRotationY(Rotation); + base.Update(gameTime); } @@ -133,12 +139,10 @@ protected override void Draw(GameTime gameTime) Effect.Parameters["View"].SetValue(View); Effect.Parameters["Projection"].SetValue(Projection); Effect.Parameters["DiffuseColor"].SetValue(Color.DarkBlue.ToVector3()); - var rotationMatrix = Matrix.CreateRotationY(Rotation); foreach (var mesh in Model.Meshes) { - World = mesh.ParentBone.Transform * rotationMatrix; - Effect.Parameters["World"].SetValue(World); + Effect.Parameters["World"].SetValue(mesh.ParentBone.Transform * World); mesh.Draw(); } }