<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-1585060137341123199</id><updated>2012-02-16T05:09:17.303-08:00</updated><category term='XNA Optimization'/><category term='XNA Tips'/><category term='Mesothelioma'/><category term='XNA Tutorial'/><category term='XNA Demo'/><title type='text'>XNA Fever</title><subtitle type='html'>Game programming using XNA</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://xnafever.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1585060137341123199/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://xnafever.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Xia</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>14</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-1585060137341123199.post-6295442077670495803</id><published>2008-07-15T21:37:00.000-07:00</published><updated>2008-07-20T07:47:32.676-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='XNA Demo'/><title type='text'>Real time dynamic soft shadow using SHEXP</title><content type='html'>&lt;br /&gt;
&lt;object width="425" height="350"&gt;&lt;param name="movie" value="http://www.youtube.com/v/tI2_n4oqh00"&gt;&lt;/param&gt;&lt;embed src="http://www.youtube.com/v/tI2_n4oqh00" type="application/x-shockwave-flash" width="425" height="350"&gt;&lt;/embed&gt;&lt;/object&gt;
&lt;br /&gt;&lt;br /&gt;
&lt;object width="425" height="350"&gt;&lt;param name="movie" value="http://www.youtube.com/v/qA5k3KIUmic"&gt;&lt;/param&gt;&lt;embed src="http://www.youtube.com/v/qA5k3KIUmic" type="application/x-shockwave-flash" width="425" height="350"&gt;&lt;/embed&gt;&lt;/object&gt;
&lt;br /&gt;&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1585060137341123199-6295442077670495803?l=xnafever.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1585060137341123199/posts/default/6295442077670495803'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1585060137341123199/posts/default/6295442077670495803'/><link rel='alternate' type='text/html' href='http://xnafever.blogspot.com/2008/07/real-time-dynamic-soft-shadow-using.html' title='Real time dynamic soft shadow using SHEXP'/><author><name>Xia</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-1585060137341123199.post-7943687609808953399</id><published>2008-07-05T11:39:00.000-07:00</published><updated>2008-07-05T11:43:46.251-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='XNA Tutorial'/><title type='text'>Full-screen mode execution</title><content type='html'>&lt;br /&gt;
For performing in full-screen mode, the following codes are added to the constructor of &lt;span style="font-weight:bold;"&gt;Game1&lt;/span&gt; class.
&lt;pre class="csharpcode"&gt;
        &lt;span class="kwrd"&gt;public&lt;/span&gt; Game1()
        {
            graphics = &lt;span class="kwrd"&gt;new&lt;/span&gt; &lt;span class="u"&gt;GraphicsDeviceManager&lt;/span&gt;(&lt;span class="kwrd"&gt;this&lt;/span&gt;);
            Content.RootDirectory = &lt;span class="str"&gt;"Content"&lt;/span&gt;;

            &lt;span class="rem"&gt;// It performs in full-screen mode.&lt;/span&gt;
            graphics.IsFullScreen = &lt;span class="kwrd"&gt;true&lt;/span&gt;;
        }&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1585060137341123199-7943687609808953399?l=xnafever.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1585060137341123199/posts/default/7943687609808953399'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1585060137341123199/posts/default/7943687609808953399'/><link rel='alternate' type='text/html' href='http://xnafever.blogspot.com/2008/07/full-screen-mode-execution.html' title='Full-screen mode execution'/><author><name>Xia</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-1585060137341123199.post-2276377747393509879</id><published>2008-07-05T11:25:00.000-07:00</published><updated>2008-07-05T11:37:43.211-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='XNA Tutorial'/><title type='text'>Exit processing of game</title><content type='html'>&lt;br /&gt;
When terminating a game, &lt;span style="font-weight:bold;"&gt;Game.Exit&lt;/span&gt; method is called within a &lt;span style="font-weight:bold;"&gt;Game1.Update&lt;/span&gt; method.&lt;br /&gt;
A code is as follows.
&lt;pre class="csharpcode"&gt;
&lt;span class="kwrd"&gt;protected&lt;/span&gt; &lt;span class="kwrd"&gt;override&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; Update(&lt;span class="u"&gt;GameTime&lt;/span&gt; gameTime)
{
    &lt;span class="rem"&gt;// Game logic is described here.&lt;/span&gt;

    &lt;span class="rem"&gt;// A game is ended.&lt;/span&gt;
    &lt;span class="kwrd"&gt;if&lt;/span&gt; (gameExit)
    {
        &lt;span class="kwrd"&gt;this&lt;/span&gt;.Exit();
        &lt;span class="kwrd"&gt;return&lt;/span&gt;;
    }

    &lt;span class="kwrd"&gt;base&lt;/span&gt;.Update(gameTime);
}&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1585060137341123199-2276377747393509879?l=xnafever.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1585060137341123199/posts/default/2276377747393509879'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1585060137341123199/posts/default/2276377747393509879'/><link rel='alternate' type='text/html' href='http://xnafever.blogspot.com/2008/07/exit-processing-of-game.html' title='Exit processing of game'/><author><name>Xia</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-1585060137341123199.post-4700092858856173554</id><published>2008-07-05T11:12:00.000-07:00</published><updated>2008-07-05T11:45:01.996-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='XNA Tutorial'/><title type='text'>Change of resolution</title><content type='html'>&lt;br /&gt;
For changing resolution, the following codes are added to the constructor of &lt;span style="font-weight:bold;"&gt;Game1&lt;/span&gt; class.
&lt;pre class="csharpcode"&gt;
        &lt;span class="kwrd"&gt;public&lt;/span&gt; Game1()
        {
            graphics = &lt;span class="kwrd"&gt;new&lt;/span&gt; &lt;span class="u"&gt;GraphicsDeviceManager&lt;/span&gt;(&lt;span class="kwrd"&gt;this&lt;/span&gt;);
            Content.RootDirectory = &lt;span class="str"&gt;"Content"&lt;/span&gt;;

            &lt;span class="rem"&gt;// Change of resolution.&lt;/span&gt;
            graphics.PreferredBackBufferWidth = 1280;
            graphics.PreferredBackBufferHeight = 720;
        }&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1585060137341123199-4700092858856173554?l=xnafever.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1585060137341123199/posts/default/4700092858856173554'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1585060137341123199/posts/default/4700092858856173554'/><link rel='alternate' type='text/html' href='http://xnafever.blogspot.com/2008/07/change-of-resolution.html' title='Change of resolution'/><author><name>Xia</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-1585060137341123199.post-3465326432237282052</id><published>2008-07-05T10:48:00.000-07:00</published><updated>2008-07-05T11:11:26.912-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='XNA Tutorial'/><title type='text'>Input(Keyboard, Mouse, GamePad)</title><content type='html'>&lt;br /&gt;
A &lt;span style="font-weight:bold;"&gt;keyboard&lt;/span&gt;, a &lt;span style="font-weight:bold;"&gt;mouse&lt;/span&gt;, and &lt;span style="font-weight:bold;"&gt;Xbox 360 controller&lt;/span&gt; can be used in &lt;span style="font-weight:bold;"&gt;PC&lt;/span&gt;.&lt;br /&gt;
A &lt;span style="font-weight:bold;"&gt;keyboard&lt;/span&gt;, and &lt;span style="font-weight:bold;"&gt;Xbox 360 controller&lt;/span&gt; can be used in &lt;span style="font-weight:bold;"&gt;Xbox 360&lt;/span&gt;.&lt;br /&gt;
&lt;br /&gt;
Coding.
&lt;pre class="csharpcode"&gt;
&lt;span class="rem"&gt;// Game1.cs&lt;/span&gt;

&lt;span class="kwrd"&gt;using&lt;/span&gt; System;
&lt;span class="kwrd"&gt;using&lt;/span&gt; System.Collections.Generic;
&lt;span class="kwrd"&gt;using&lt;/span&gt; Microsoft.Xna.Framework;
&lt;span class="kwrd"&gt;using&lt;/span&gt; Microsoft.Xna.Framework.Audio;
&lt;span class="kwrd"&gt;using&lt;/span&gt; Microsoft.Xna.Framework.Content;
&lt;span class="kwrd"&gt;using&lt;/span&gt; Microsoft.Xna.Framework.GamerServices;
&lt;span class="kwrd"&gt;using&lt;/span&gt; Microsoft.Xna.Framework.Graphics;
&lt;span class="kwrd"&gt;using&lt;/span&gt; Microsoft.Xna.Framework.Input;
&lt;span class="kwrd"&gt;using&lt;/span&gt; Microsoft.Xna.Framework.Net;
&lt;span class="kwrd"&gt;using&lt;/span&gt; Microsoft.Xna.Framework.Storage;

&lt;span class="kwrd"&gt;namespace&lt;/span&gt; Sample
{
    &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;class&lt;/span&gt; &lt;span class="u"&gt;Game1&lt;/span&gt; : Microsoft.Xna.Framework.&lt;span class="u"&gt;Game&lt;/span&gt;
    {
        &lt;span class="u"&gt;GraphicsDeviceManager&lt;/span&gt; graphics;

        &lt;span class="kwrd"&gt;public&lt;/span&gt; Game1()
        {
            graphics = &lt;span class="kwrd"&gt;new&lt;/span&gt; &lt;span class="u"&gt;GraphicsDeviceManager&lt;/span&gt;(&lt;span class="kwrd"&gt;this&lt;/span&gt;);
            Content.RootDirectory = &lt;span class="str"&gt;"Content"&lt;/span&gt;;
        }

        &lt;span class="kwrd"&gt;protected&lt;/span&gt; &lt;span class="kwrd"&gt;override&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; Initialize()
        {
            &lt;span class="kwrd"&gt;base&lt;/span&gt;.Initialize();
        }

        &lt;span class="kwrd"&gt;protected&lt;/span&gt; &lt;span class="kwrd"&gt;override&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; LoadContent()
        {
        }

        &lt;span class="kwrd"&gt;protected&lt;/span&gt; &lt;span class="kwrd"&gt;override&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; UnloadContent()
        {
        }

        &lt;span class="kwrd"&gt;protected&lt;/span&gt; &lt;span class="kwrd"&gt;override&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; Update(&lt;span class="u"&gt;GameTime&lt;/span&gt; gameTime)
        {
            &lt;span class="u"&gt;KeyboardState&lt;/span&gt; keyboardState = &lt;span class="u"&gt;Keyboard&lt;/span&gt;.GetState();
            &lt;span class="u"&gt;MouseState&lt;/span&gt; mouseState = &lt;span class="u"&gt;Mouse&lt;/span&gt;.GetState();
            &lt;span class="u"&gt;GamePadState&lt;/span&gt; gamePadState = &lt;span class="u"&gt;GamePad&lt;/span&gt;.GetState(&lt;span class="u"&gt;PlayerIndex&lt;/span&gt;.One);

            &lt;span class="rem"&gt;// As an example getting some input state.&lt;/span&gt;

            &lt;span class="kwrd"&gt;if&lt;/span&gt; (keyboardState.IsKeyDown(&lt;span class="u"&gt;Keys&lt;/span&gt;.Space))
            {
                &lt;span class="rem"&gt;// Processing when pushing the space key of a keyboard.&lt;/span&gt;
            }

            &lt;span class="kwrd"&gt;if&lt;/span&gt; (mouseState.LeftButton == &lt;span class="u"&gt;ButtonState&lt;/span&gt;.Pressed)
            {
                &lt;span class="rem"&gt;// Processing when carrying out the left click of the mouse.&lt;/span&gt;
            }

            &lt;span class="kwrd"&gt;if&lt;/span&gt; (gamePadState.IsConnected)
            {
                &lt;span class="kwrd"&gt;if&lt;/span&gt; (gamePadState.Buttons.A == &lt;span class="u"&gt;ButtonState&lt;/span&gt;.Pressed)
                {
                    &lt;span class="rem"&gt;// Processing when pushing the A button of a gamepad.&lt;/span&gt;
                }
            }

            &lt;span class="kwrd"&gt;base&lt;/span&gt;.Update(gameTime);
        }

        &lt;span class="kwrd"&gt;protected&lt;/span&gt; &lt;span class="kwrd"&gt;override&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; Draw(&lt;span class="u"&gt;GameTime&lt;/span&gt; gameTime)
        {
            graphics.GraphicsDevice.Clear(&lt;span class="u"&gt;Color&lt;/span&gt;.CornflowerBlue);

            &lt;span class="kwrd"&gt;base&lt;/span&gt;.Draw(gameTime);
        }
    }
}&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1585060137341123199-3465326432237282052?l=xnafever.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1585060137341123199/posts/default/3465326432237282052'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1585060137341123199/posts/default/3465326432237282052'/><link rel='alternate' type='text/html' href='http://xnafever.blogspot.com/2008/07/inputkeyboard-mouse-gamepad.html' title='Input(Keyboard, Mouse, GamePad)'/><author><name>Xia</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-1585060137341123199.post-3391474096391385610</id><published>2008-07-05T10:18:00.001-07:00</published><updated>2008-07-05T10:39:14.313-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='XNA Tutorial'/><title type='text'>SpriteFont</title><content type='html'>&lt;br /&gt;
The right click of the &lt;span style="font-weight:bold;"&gt;Content&lt;/span&gt; project.&lt;br /&gt;
"&lt;span style="font-weight:bold;"&gt;Sprite Font&lt;/span&gt;" is added from a template.&lt;br /&gt;
As an example it named "&lt;span style="font-weight:bold;"&gt;SpriteFont1.spritefont&lt;/span&gt;".&lt;br /&gt;
Please set up the font of liking(&lt;span style="font-weight:bold;"&gt;.spritefont&lt;/span&gt; file is an easy XML format).&lt;br /&gt;
&lt;br /&gt;
And coding.
&lt;pre class="csharpcode"&gt;
&lt;span class="rem"&gt;// Game1.cs&lt;/span&gt;

&lt;span class="kwrd"&gt;using&lt;/span&gt; System;
&lt;span class="kwrd"&gt;using&lt;/span&gt; System.Collections.Generic;
&lt;span class="kwrd"&gt;using&lt;/span&gt; Microsoft.Xna.Framework;
&lt;span class="kwrd"&gt;using&lt;/span&gt; Microsoft.Xna.Framework.Audio;
&lt;span class="kwrd"&gt;using&lt;/span&gt; Microsoft.Xna.Framework.Content;
&lt;span class="kwrd"&gt;using&lt;/span&gt; Microsoft.Xna.Framework.GamerServices;
&lt;span class="kwrd"&gt;using&lt;/span&gt; Microsoft.Xna.Framework.Graphics;
&lt;span class="kwrd"&gt;using&lt;/span&gt; Microsoft.Xna.Framework.Input;
&lt;span class="kwrd"&gt;using&lt;/span&gt; Microsoft.Xna.Framework.Net;
&lt;span class="kwrd"&gt;using&lt;/span&gt; Microsoft.Xna.Framework.Storage;

&lt;span class="kwrd"&gt;namespace&lt;/span&gt; Sample
{
    &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;class&lt;/span&gt; &lt;span class="u"&gt;Game1&lt;/span&gt; : Microsoft.Xna.Framework.&lt;span class="u"&gt;Game&lt;/span&gt;
    {
        &lt;span class="u"&gt;GraphicsDeviceManager&lt;/span&gt; graphics;

        &lt;span class="u"&gt;SpriteBatch&lt;/span&gt; spriteBatch;
        &lt;span class="u"&gt;SpriteFont&lt;/span&gt; spriteFont;

        &lt;span class="kwrd"&gt;public&lt;/span&gt; Game1()
        {
            graphics = &lt;span class="kwrd"&gt;new&lt;/span&gt; &lt;span class="u"&gt;GraphicsDeviceManager&lt;/span&gt;(&lt;span class="kwrd"&gt;this&lt;/span&gt;);
            Content.RootDirectory = &lt;span class="str"&gt;"Content"&lt;/span&gt;;
        }

        &lt;span class="kwrd"&gt;protected&lt;/span&gt; &lt;span class="kwrd"&gt;override&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; Initialize()
        {
            &lt;span class="kwrd"&gt;base&lt;/span&gt;.Initialize();
        }

        &lt;span class="kwrd"&gt;protected&lt;/span&gt; &lt;span class="kwrd"&gt;override&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; LoadContent()
        {
            spriteBatch = &lt;span class="kwrd"&gt;new&lt;/span&gt; &lt;span class="u"&gt;SpriteBatch&lt;/span&gt;(GraphicsDevice);
            spriteFont = Content.Load&amp;lt;&lt;span class="u"&gt;SpriteFont&lt;/span&gt;&amp;gt;(&lt;span class="str"&gt;"SpriteFont1"&lt;/span&gt;);
        }

        &lt;span class="kwrd"&gt;protected&lt;/span&gt; &lt;span class="kwrd"&gt;override&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; UnloadContent()
        {
        }

        &lt;span class="kwrd"&gt;protected&lt;/span&gt; &lt;span class="kwrd"&gt;override&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; Update(&lt;span class="u"&gt;GameTime&lt;/span&gt; gameTime)
        {
            &lt;span class="kwrd"&gt;base&lt;/span&gt;.Update(gameTime);
        }

        &lt;span class="kwrd"&gt;protected&lt;/span&gt; &lt;span class="kwrd"&gt;override&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; Draw(&lt;span class="u"&gt;GameTime&lt;/span&gt; gameTime)
        {
            graphics.GraphicsDevice.Clear(&lt;span class="u"&gt;Color&lt;/span&gt;.CornflowerBlue);

            spriteBatch.Begin();
            spriteBatch.DrawString(spriteFont, &lt;span class="str"&gt;"Hello, XNA world!"&lt;/span&gt;, &lt;span class="kwrd"&gt;new&lt;/span&gt; &lt;span class="u"&gt;Vector2&lt;/span&gt;(0, 0), &lt;span class="u"&gt;Color&lt;/span&gt;.White);
            spriteBatch.End();

            &lt;span class="kwrd"&gt;base&lt;/span&gt;.Draw(gameTime);
        }
    }
}&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1585060137341123199-3391474096391385610?l=xnafever.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1585060137341123199/posts/default/3391474096391385610'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1585060137341123199/posts/default/3391474096391385610'/><link rel='alternate' type='text/html' href='http://xnafever.blogspot.com/2008/07/spritefont.html' title='SpriteFont'/><author><name>Xia</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-1585060137341123199.post-3555932112467200384</id><published>2008-07-01T09:47:00.006-07:00</published><updated>2008-07-16T18:10:56.965-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='XNA Tips'/><title type='text'>4xMSAA(Multi Sampling Anti Aliasing)</title><content type='html'>&lt;br /&gt;
Let's use multisample anti-aliasing(MSAA).&lt;br /&gt;
&lt;br /&gt;
The code hooked in a PreparingDeviceSetting event is added to the constructor of a &lt;span style="font-weight:bold;"&gt;Game1&lt;/span&gt; class.
&lt;pre class="csharpcode"&gt;
    graphics.PreparingDeviceSettings += &lt;span class="kwrd"&gt;new&lt;/span&gt; &lt;span class="u"&gt;EventHandler&lt;/span&gt;&amp;lt;&lt;span class="u"&gt;PreparingDeviceSettingsEventArgs&lt;/span&gt;&amp;gt;(GraphicsPreparingDeviceSettings);&lt;/pre&gt;
And the following codes are added.
&lt;pre class="csharpcode"&gt;
&lt;span class="kwrd"&gt;void&lt;/span&gt; GraphicsPreparingDeviceSettings(&lt;span class="kwrd"&gt;object&lt;/span&gt; sender, &lt;span class="u"&gt;PreparingDeviceSettingsEventArgs&lt;/span&gt; e)
{
    &lt;span class="u"&gt;PresentationParameters&lt;/span&gt; pp = e.GraphicsDeviceInformation.PresentationParameters;
&lt;span class="kwrd"&gt;#if&lt;/span&gt; XBOX
    pp.MultiSampleQuality = 1;
    pp.MultiSampleType = &lt;span class="u"&gt;MultiSampleType&lt;/span&gt;.FourSamples;
    &lt;span class="kwrd"&gt;return&lt;/span&gt;;
&lt;span class="kwrd"&gt;#endif&lt;/span&gt;
    &lt;span class="u"&gt;GraphicsAdapter&lt;/span&gt; adapter = e.GraphicsDeviceInformation.Adapter;
    &lt;span class="u"&gt;SurfaceFormat&lt;/span&gt; format = adapter.CurrentDisplayMode.Format;

    &lt;span class="kwrd"&gt;int&lt;/span&gt; quality = 0;
    &lt;span class="kwrd"&gt;if&lt;/span&gt; (adapter.CheckDeviceMultiSampleType(&lt;span class="u"&gt;DeviceType&lt;/span&gt;.Hardware, format, &lt;span class="kwrd"&gt;false&lt;/span&gt;, &lt;span class="u"&gt;MultiSampleType&lt;/span&gt;.FourSamples, &lt;span class="kwrd"&gt;out&lt;/span&gt; quality))
    {
        pp.MultiSampleQuality = 0;
        pp.MultiSampleType = &lt;span class="u"&gt;MultiSampleType&lt;/span&gt;.FourSamples;
    }
    &lt;span class="kwrd"&gt;else&lt;/span&gt; &lt;span class="kwrd"&gt;if&lt;/span&gt; (adapter.CheckDeviceMultiSampleType(&lt;span class="u"&gt;DeviceType&lt;/span&gt;.Hardware, format, &lt;span class="kwrd"&gt;false&lt;/span&gt;, &lt;span class="u"&gt;MultiSampleType&lt;/span&gt;.TwoSamples, &lt;span class="kwrd"&gt;out&lt;/span&gt; quality))
    {
        pp.MultiSampleQuality = 0;
        pp.MultiSampleType = &lt;span class="u"&gt;MultiSampleType&lt;/span&gt;.TwoSamples;
    }
}&lt;/pre&gt;
&lt;span style="font-weight:bold;"&gt;Reference&lt;/span&gt;&lt;br /&gt;
Higeneko diary&lt;br /&gt;
&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1585060137341123199-3555932112467200384?l=xnafever.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1585060137341123199/posts/default/3555932112467200384'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1585060137341123199/posts/default/3555932112467200384'/><link rel='alternate' type='text/html' href='http://xnafever.blogspot.com/2008/07/4xmsaamulti-sampling-anti-aliasing.html' title='4xMSAA(Multi Sampling Anti Aliasing)'/><author><name>Xia</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-1585060137341123199.post-8444982563116547466</id><published>2008-07-01T09:01:00.013-07:00</published><updated>2008-07-16T18:10:32.876-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='XNA Optimization'/><title type='text'>Multi-core in Xbox 360</title><content type='html'>&lt;br /&gt;
Xbox 360 has 3 core composition which can use 6 hardware threads (HWT).&lt;br /&gt;
The number is shaken at HWT.&lt;br /&gt;
&lt;br /&gt;
&lt;table align="center" border="1"&gt;
 &lt;tbody&gt;
  &lt;tr&gt;
   &lt;th bgcolor="#F5E39e"&gt;Core&lt;/th&gt;
   &lt;th bgcolor="#F5E39e"&gt;HWT&lt;/th&gt;
   &lt;th bgcolor="#F5E39e"&gt;Use&lt;/th&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
   &lt;th bgcolor="#f5b3c1"&gt;0&lt;/th&gt;
   &lt;th bgcolor="#f5b3c1"&gt;0&lt;/th&gt;
   &lt;th bgcolor="#f5b3c1"&gt;Use is impossible. System notice, Transformer port, Service.&lt;/th&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
   &lt;th bgcolor="#b3f5cb"&gt;0&lt;/th&gt;
   &lt;th bgcolor="#b3f5cb"&gt;1&lt;/th&gt;
   &lt;th bgcolor="#b3f5cb"&gt;Use is possible. Game main thread, GSE host, .NetCF.&lt;/th&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
   &lt;th bgcolor="#f5b3c1"&gt;1&lt;/th&gt;
   &lt;th bgcolor="#f5b3c1"&gt;2&lt;/th&gt;
   &lt;th bgcolor="#f5b3c1"&gt;Use is impossible. Asynchronous Xbox 360 content operation.&lt;/th&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
   &lt;th bgcolor="#b3f5cb"&gt;1&lt;/th&gt;
   &lt;th bgcolor="#b3f5cb"&gt;3&lt;/th&gt;
   &lt;th bgcolor="#b3f5cb"&gt;Use is possible. Xbox 360 guide, Dashboard.&lt;/th&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
   &lt;th bgcolor="#b3f5cb"&gt;2&lt;/th&gt;
   &lt;th bgcolor="#b3f5cb"&gt;4&lt;/th&gt;
   &lt;th bgcolor="#b3f5cb"&gt;Use is possible. Xbox Live market place download.&lt;/th&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
   &lt;th bgcolor="#b3f5cb"&gt;2&lt;/th&gt;
   &lt;th bgcolor="#b3f5cb"&gt;5&lt;/th&gt;
   &lt;th bgcolor="#b3f5cb"&gt;Use is possible. Xbox 360 guide, Dashboard.&lt;/th&gt;
  &lt;/tr&gt;
 &lt;/tbody&gt;
&lt;/table&gt;
&lt;br /&gt;
&lt;span style="font-weight:bold;"&gt;Thread.SetProcessorAffinity&lt;/span&gt; method is used for assignment of HWT.&lt;br /&gt;
However, since only assignment of the thread under execution can do this method now, it is necessary to specify it as the beginning of the entry point of a thread.&lt;br /&gt;
The technique of the multithread of C#/.NET can be used as it is.&lt;br /&gt;
&lt;br /&gt;
&lt;span style="font-weight:bold;"&gt;Reference&lt;/span&gt;&lt;br /&gt;
Higeneko diary&lt;br /&gt;
&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1585060137341123199-8444982563116547466?l=xnafever.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1585060137341123199/posts/default/8444982563116547466'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1585060137341123199/posts/default/8444982563116547466'/><link rel='alternate' type='text/html' href='http://xnafever.blogspot.com/2008/07/multi-core-in-xbox360.html' title='Multi-core in Xbox 360'/><author><name>Xia</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-1585060137341123199.post-7213156916086312911</id><published>2008-07-01T08:49:00.001-07:00</published><updated>2008-07-16T18:10:20.665-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='XNA Optimization'/><title type='text'>Inline method by XNA on Xbox 360</title><content type='html'>&lt;br /&gt;
The inline method which mitigates the overhead of a call of a method.&lt;br /&gt;
JIT forms into an inline what fulfills the following conditions.&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;The IL code size is 16 bytes or less.&lt;/li&gt;
&lt;li&gt;The branch command is not used (if sentence etc.).&lt;/li&gt;
&lt;li&gt;The local variable is not used.&lt;/li&gt;
&lt;li&gt;Exception handling has not been carried out (try, catch, etc.).&lt;/li&gt;
&lt;li&gt;float is not used as the argument or return value of a method (probably by the Xbox 360, not applied).&lt;/li&gt;
&lt;li&gt;When two or more arguments are in a method, it uses for the turn declared.&lt;/li&gt;
&lt;/ul&gt;
However, a virtual function is not formed into an inline.&lt;br /&gt;
&lt;br /&gt;
&lt;span style="font-weight:bold;"&gt;Reference&lt;/span&gt;&lt;br /&gt;
Higeneko diary&lt;br /&gt;
&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1585060137341123199-7213156916086312911?l=xnafever.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1585060137341123199/posts/default/7213156916086312911'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1585060137341123199/posts/default/7213156916086312911'/><link rel='alternate' type='text/html' href='http://xnafever.blogspot.com/2008/07/inline-method-by-xna-on-xbox360.html' title='Inline method by XNA on Xbox 360'/><author><name>Xia</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-1585060137341123199.post-2452206166255387793</id><published>2008-07-01T08:39:00.001-07:00</published><updated>2008-07-16T18:09:07.194-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='XNA Tips'/><title type='text'>TCR(Technical Certification Requirements)</title><content type='html'>&lt;ul&gt;
&lt;li&gt;If connection of a controller goes out, the message which changes a game into a pause state and demands re-connection of a controller from a user will be displayed.&lt;/li&gt;
&lt;li&gt;The same screen is not displayed continuously 5 seconds or more.&lt;/li&gt;
&lt;li&gt;When the state where a user cannot operate it continues 15 seconds or more, the work in which a user is not bored is carried out.&lt;/li&gt;
&lt;li&gt;A message is displayed in safe area.&lt;/li&gt;
&lt;li&gt;Antialiasing is used.&lt;/li&gt;
&lt;/ul&gt;
&lt;span style="font-weight:bold;"&gt;Reference&lt;/span&gt;&lt;br /&gt;
Hinikeni XNA&lt;br /&gt;
&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1585060137341123199-2452206166255387793?l=xnafever.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1585060137341123199/posts/default/2452206166255387793'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1585060137341123199/posts/default/2452206166255387793'/><link rel='alternate' type='text/html' href='http://xnafever.blogspot.com/2008/07/tcrtechnical-certification-requirements.html' title='TCR(Technical Certification Requirements)'/><author><name>Xia</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-1585060137341123199.post-6647125378659056072</id><published>2008-07-01T08:12:00.006-07:00</published><updated>2008-07-16T18:08:46.018-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='XNA Tips'/><title type='text'>Supposition of GraphicsDevice in XNA 2.0</title><content type='html'>&lt;br /&gt;
In XNA2.0, the treatment of a graphics resource becomes easy and the necessity of caring about problems, such as device lost generated on Windows, can generate a graphics resource now easily within &lt;span style="font-weight:bold;"&gt;Game.LoadContent&lt;/span&gt; almost newly added in nothing.&lt;br /&gt;
In order that a &lt;span style="font-weight:bold;"&gt;LoadGraphicsContent&lt;/span&gt; method may also maintain compatibility with XNA 1.0, it is called only at once.&lt;br /&gt;
&lt;br /&gt;
Once it generates all graphics resources, such as &lt;span style="font-weight:bold;"&gt;Texture2D&lt;/span&gt;, &lt;span style="font-weight:bold;"&gt;VertexBuffer&lt;/span&gt;, and &lt;span style="font-weight:bold;"&gt;RenderTarget&lt;/span&gt;, on XNA2.0, the instance will be in an always effective state.&lt;br /&gt;
Of course, even when it moves between monitors in a window in size change of the case which device lost and device reset generate, for example, a window, the change to a full screen, and a multi-monitor environment, the instance made first can be used satisfactory.&lt;br /&gt;
&lt;br /&gt;
However, the contents of graphics resources which rewrite the contents dynamically, such as &lt;span style="font-weight:bold;"&gt;RenderTarget&lt;/span&gt; and &lt;span style="font-weight:bold;"&gt;DynamicVertexBuffer&lt;/span&gt;, will be canceled on restriction of the driver model of DirectX 9 at the time of device lost.&lt;br /&gt;
Usually, since it is generated with the following frame even if the contents are canceled, since many of graphics resources generated dynamically are generated for every frame, it is not necessary to carry out special processing.&lt;br /&gt;
Only when using techniques, such as motion blur by drawing in piles the contents of the graphics resource which must hold the contents between frames, for example, the brightness texture for tone mapping used by the HDR rendering, and a front frame, it is necessary to make it the initial value right at the time of device lost.&lt;br /&gt;
&lt;br /&gt;
Conclusion
&lt;ul&gt;
&lt;li&gt;A graphics resource is generated within &lt;span style="font-weight:bold;"&gt;Game.LoadContent&lt;/span&gt;.&lt;/li&gt;
&lt;li&gt;It is only at the time of a program start that &lt;span style="font-weight:bold;"&gt;Game.LoadContent&lt;/span&gt; is called.&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:bold;"&gt;DrawableGameComponent.LoadContent&lt;/span&gt; is called only at the time of initialization of a component.&lt;/li&gt;
&lt;li&gt;It became unnecessary to remake the instance of a graphics resource.&lt;/li&gt;
&lt;li&gt;As for the graphics resource which holds the contents between frames, the contents are canceled at the time of device lost.&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;The instance itself is effective also at the time of device lost, as.&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:bold;"&gt;SetData&amp;lt;T&amp;gt;&lt;/span&gt; etc. is used at the time of a &lt;span style="font-weight:bold;"&gt;GraphicsDevice.DeviceReset&lt;/span&gt; event, and changing into an initial value is only.&lt;/li&gt;
&lt;/ul&gt;
&lt;/ul&gt;
&lt;span style="font-weight:bold;"&gt;Reference&lt;/span&gt;&lt;br /&gt;
Hinikeni XNA&lt;br /&gt;
&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1585060137341123199-6647125378659056072?l=xnafever.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1585060137341123199/posts/default/6647125378659056072'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1585060137341123199/posts/default/6647125378659056072'/><link rel='alternate' type='text/html' href='http://xnafever.blogspot.com/2008/07/supposition-of-graphicsdevice-in-xna-20.html' title='Supposition of GraphicsDevice in XNA 2.0'/><author><name>Xia</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-1585060137341123199.post-2122462824109870558</id><published>2008-06-30T23:53:00.012-07:00</published><updated>2008-07-05T10:28:24.110-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='XNA Tutorial'/><title type='text'>SpriteBatch</title><content type='html'>&lt;br /&gt;
The example which draws "GameThumbnail.png".
&lt;ul&gt;
&lt;li&gt;"GameThumbnail.png" is copied.&lt;/li&gt;
&lt;li&gt;It pastes into the "Content" project.&lt;/li&gt;
&lt;li&gt;It checks that the asset name is "GameThumbnail".&lt;/li&gt;
&lt;/ul&gt;
And coding.
&lt;pre class="csharpcode"&gt;
&lt;span class="rem"&gt;// Game1.cs&lt;/span&gt;

&lt;span class="kwrd"&gt;using&lt;/span&gt; System;
&lt;span class="kwrd"&gt;using&lt;/span&gt; System.Collections.Generic;
&lt;span class="kwrd"&gt;using&lt;/span&gt; Microsoft.Xna.Framework;
&lt;span class="kwrd"&gt;using&lt;/span&gt; Microsoft.Xna.Framework.Audio;
&lt;span class="kwrd"&gt;using&lt;/span&gt; Microsoft.Xna.Framework.Content;
&lt;span class="kwrd"&gt;using&lt;/span&gt; Microsoft.Xna.Framework.GamerServices;
&lt;span class="kwrd"&gt;using&lt;/span&gt; Microsoft.Xna.Framework.Graphics;
&lt;span class="kwrd"&gt;using&lt;/span&gt; Microsoft.Xna.Framework.Input;
&lt;span class="kwrd"&gt;using&lt;/span&gt; Microsoft.Xna.Framework.Net;
&lt;span class="kwrd"&gt;using&lt;/span&gt; Microsoft.Xna.Framework.Storage;

&lt;span class="kwrd"&gt;namespace&lt;/span&gt; Sample
{
    &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;class&lt;/span&gt; &lt;span class="u"&gt;Game1&lt;/span&gt; : Microsoft.Xna.Framework.&lt;span class="u"&gt;Game&lt;/span&gt;
    {
        &lt;span class="u"&gt;GraphicsDeviceManager&lt;/span&gt; graphics;

        &lt;span class="u"&gt;SpriteBatch&lt;/span&gt; spriteBatch;
        &lt;span class="u"&gt;Texture2D&lt;/span&gt; texture;

        &lt;span class="kwrd"&gt;public&lt;/span&gt; Game1()
        {
            graphics = &lt;span class="kwrd"&gt;new&lt;/span&gt; &lt;span class="u"&gt;GraphicsDeviceManager&lt;/span&gt;(&lt;span class="kwrd"&gt;this&lt;/span&gt;);
            Content.RootDirectory = &lt;span class="str"&gt;"Content"&lt;/span&gt;;
        }

        &lt;span class="kwrd"&gt;protected&lt;/span&gt; &lt;span class="kwrd"&gt;override&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; Initialize()
        {
            &lt;span class="kwrd"&gt;base&lt;/span&gt;.Initialize();
        }

        &lt;span class="kwrd"&gt;protected&lt;/span&gt; &lt;span class="kwrd"&gt;override&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; LoadContent()
        {
            spriteBatch = &lt;span class="kwrd"&gt;new&lt;/span&gt; &lt;span class="u"&gt;SpriteBatch&lt;/span&gt;(GraphicsDevice);
            texture = Content.Load&amp;lt;&lt;span class="u"&gt;Texture2D&lt;/span&gt;&amp;gt;(&lt;span class="str"&gt;"GameThumbnail"&lt;/span&gt;);
        }

        &lt;span class="kwrd"&gt;protected&lt;/span&gt; &lt;span class="kwrd"&gt;override&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; UnloadContent()
        {
        }

        &lt;span class="kwrd"&gt;protected&lt;/span&gt; &lt;span class="kwrd"&gt;override&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; Update(&lt;span class="u"&gt;GameTime&lt;/span&gt; gameTime)
        {
            &lt;span class="kwrd"&gt;base&lt;/span&gt;.Update(gameTime);
        }

        &lt;span class="kwrd"&gt;protected&lt;/span&gt; &lt;span class="kwrd"&gt;override&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; Draw(&lt;span class="u"&gt;GameTime&lt;/span&gt; gameTime)
        {
            graphics.GraphicsDevice.Clear(&lt;span class="u"&gt;Color&lt;/span&gt;.CornflowerBlue);

            spriteBatch.Begin(&lt;span class="u"&gt;SpriteBlendMode&lt;/span&gt;.None, &lt;span class="u"&gt;SpriteSortMode&lt;/span&gt;.Immediate, &lt;span class="u"&gt;SaveStateMode&lt;/span&gt;.None);
            spriteBatch.Draw(texture, &lt;span class="kwrd"&gt;new&lt;/span&gt; &lt;span class="u"&gt;Vector2&lt;/span&gt;(0, 0), &lt;span class="u"&gt;Color&lt;/span&gt;.White);
            spriteBatch.End();

            &lt;span class="kwrd"&gt;base&lt;/span&gt;.Draw(gameTime);
        }
    }
}
&lt;/pre&gt;
SpriteBatch can specify and draw the arbitrary domains of Texture for a position, a color, an angle, the rate of expansion reduction, vertical / horizontal reversal, and depth by the overload of a &lt;span style="font-weight:bold;"&gt;SpriteBatch.Draw&lt;/span&gt; method.&lt;br /&gt;
&lt;br /&gt;
Moreover, alpha blend / addition drawing and sorting processing of batching can also be specified by the overload of a &lt;span style="font-weight:bold;"&gt;SpriteBatch.Begin&lt;/span&gt; method.&lt;br /&gt;
&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1585060137341123199-2122462824109870558?l=xnafever.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1585060137341123199/posts/default/2122462824109870558'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1585060137341123199/posts/default/2122462824109870558'/><link rel='alternate' type='text/html' href='http://xnafever.blogspot.com/2008/07/spritebatch.html' title='SpriteBatch'/><author><name>Xia</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-1585060137341123199.post-7089986071108253558</id><published>2008-06-26T18:58:00.008-07:00</published><updated>2008-07-01T00:20:20.316-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='XNA Tutorial'/><title type='text'>Template</title><content type='html'>&lt;br /&gt;
It is the easy template code which displays a window by XNA.
&lt;pre class="csharpcode"&gt;
&lt;span class="rem"&gt;// Game1.cs&lt;/span&gt;

&lt;span class="kwrd"&gt;using&lt;/span&gt; System;
&lt;span class="kwrd"&gt;using&lt;/span&gt; System.Collections.Generic;
&lt;span class="kwrd"&gt;using&lt;/span&gt; Microsoft.Xna.Framework;
&lt;span class="kwrd"&gt;using&lt;/span&gt; Microsoft.Xna.Framework.Audio;
&lt;span class="kwrd"&gt;using&lt;/span&gt; Microsoft.Xna.Framework.Content;
&lt;span class="kwrd"&gt;using&lt;/span&gt; Microsoft.Xna.Framework.GamerServices;
&lt;span class="kwrd"&gt;using&lt;/span&gt; Microsoft.Xna.Framework.Graphics;
&lt;span class="kwrd"&gt;using&lt;/span&gt; Microsoft.Xna.Framework.Input;
&lt;span class="kwrd"&gt;using&lt;/span&gt; Microsoft.Xna.Framework.Net;
&lt;span class="kwrd"&gt;using&lt;/span&gt; Microsoft.Xna.Framework.Storage;

&lt;span class="kwrd"&gt;namespace&lt;/span&gt; Sample
{
   &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;class&lt;/span&gt; &lt;span class="u"&gt;Game1&lt;/span&gt; : Microsoft.Xna.Framework.&lt;span class="u"&gt;Game&lt;/span&gt;
   {
       &lt;span class="u"&gt;GraphicsDeviceManager&lt;/span&gt; graphics;

       &lt;span class="kwrd"&gt;public&lt;/span&gt; Game1()
       {
           graphics = &lt;span class="kwrd"&gt;new&lt;/span&gt; &lt;span class="u"&gt;GraphicsDeviceManager&lt;/span&gt;(&lt;span class="kwrd"&gt;this&lt;/span&gt;);
           Content.RootDirectory = &lt;span class="str"&gt;"Content"&lt;/span&gt;;
       }

       &lt;span class="kwrd"&gt;protected&lt;/span&gt; &lt;span class="kwrd"&gt;override&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; Initialize()
       {
           &lt;span class="kwrd"&gt;base&lt;/span&gt;.Initialize();
       }

       &lt;span class="kwrd"&gt;protected&lt;/span&gt; &lt;span class="kwrd"&gt;override&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; LoadContent()
       {
       }

       &lt;span class="kwrd"&gt;protected&lt;/span&gt; &lt;span class="kwrd"&gt;override&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; UnloadContent()
       {
       }

       &lt;span class="kwrd"&gt;protected&lt;/span&gt; &lt;span class="kwrd"&gt;override&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; Update(&lt;span class="u"&gt;GameTime&lt;/span&gt; gameTime)
       {
           &lt;span class="kwrd"&gt;base&lt;/span&gt;.Update(gameTime);
       }

       &lt;span class="kwrd"&gt;protected&lt;/span&gt; &lt;span class="kwrd"&gt;override&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; Draw(&lt;span class="u"&gt;GameTime&lt;/span&gt; gameTime)
       {
           graphics.GraphicsDevice.Clear(&lt;span class="u"&gt;Color&lt;/span&gt;.CornflowerBlue);

           &lt;span class="kwrd"&gt;base&lt;/span&gt;.Draw(gameTime);
       }
   }
}
&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1585060137341123199-7089986071108253558?l=xnafever.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1585060137341123199/posts/default/7089986071108253558'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1585060137341123199/posts/default/7089986071108253558'/><link rel='alternate' type='text/html' href='http://xnafever.blogspot.com/2008/06/template.html' title='Template'/><author><name>Xia</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-1585060137341123199.post-561518222156162708</id><published>2008-06-26T05:13:00.004-07:00</published><updated>2008-07-09T07:36:34.049-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Mesothelioma'/><title type='text'>What is mesothelioma</title><content type='html'>&lt;br /&gt;
There are a good nature and malignancy in mesothelioma.&lt;br /&gt;
&lt;br /&gt;
The most occurs by suction of asbestos.&lt;br /&gt;
It has generated not only in asbestos mining laborers or the laborers treating asbestos but in the residents around a mine or a factory or laborers' family.&lt;br /&gt;
&lt;br /&gt;
A risk becomes high, so that an exposure history is so long that there is much exposure.&lt;br /&gt;
&lt;br /&gt;
An exposure history especially clear in a woman may not be found.&lt;br /&gt;
Although the lung cancer risk with asbestos is strengthened by smoking, it is thought that the risk of mesothelioma is not strengthened.&lt;br /&gt;
&lt;br /&gt;
Benign mesothelioma can expect recovery by the surgery treatment.&lt;br /&gt;
&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1585060137341123199-561518222156162708?l=xnafever.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1585060137341123199/posts/default/561518222156162708'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1585060137341123199/posts/default/561518222156162708'/><link rel='alternate' type='text/html' href='http://xnafever.blogspot.com/2008/06/what-is-mesothelioma.html' title='What is mesothelioma'/><author><name>Xia</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry></feed>
