<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://forums.xna.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>XNA Framework</title><link>http://forums.xna.com/forums/56.aspx</link><description /><dc:language>en</dc:language><generator>CommunityServer 2007.1 (Build: 0.0)</generator><item><title>XACT Audio File "InvalidDataException" on Xbox</title><link>http://forums.xna.com/forums/thread/253203.aspx</link><pubDate>Thu, 19 Nov 2009 20:36:05 GMT</pubDate><guid isPermaLink="false">4aa5dbf6-357b-46b2-b5b2-1b660a6dc370:253203</guid><dc:creator>wowy7</dc:creator><slash:comments>7</slash:comments><comments>http://forums.xna.com/forums/thread/253203.aspx</comments><wfw:commentRss>http://forums.xna.com/forums/commentrss.aspx?SectionID=56&amp;PostID=253203</wfw:commentRss><description>Hi all,&lt;br /&gt;
&lt;br /&gt;
I am having a problem running some code on the Xbox. Whenever I load the audio data files, I get &amp;quot;InvalidDataException&amp;quot;. The weird thing is, when I run the code on the computer, it runs without any exceptions. I also notice that when I comment out the lines that load the XACT files, the code seems to run on the Xbox. I have tried searching all over the internet and can&amp;#39;t really find anything about this. Does anyone know what I can do to fix this? I am really anxious about making my first game.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</description></item><item><title>Removing int[] from lists</title><link>http://forums.xna.com/forums/thread/252708.aspx</link><pubDate>Wed, 18 Nov 2009 13:57:42 GMT</pubDate><guid isPermaLink="false">4aa5dbf6-357b-46b2-b5b2-1b660a6dc370:252708</guid><dc:creator>Jason Guthrie</dc:creator><slash:comments>5</slash:comments><comments>http://forums.xna.com/forums/thread/252708.aspx</comments><wfw:commentRss>http://forums.xna.com/forums/commentrss.aspx?SectionID=56&amp;PostID=252708</wfw:commentRss><description>Having a really strange error from the framework here. I have a static list full of int[] called laser targets. Adding and reading from this list is fine but when i try and remove items from the list nothing happens. what i am trying to do in my call is similar to this:&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Spawner.laserTargets.Remove(new int[]{0,0});&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;but when the code runs it doesnt remove the int[] and it is definitely there. I have also tried:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;int[] temp = new int[]{0,0};&lt;/div&gt;&lt;div&gt;Spawner.laserTargets.Remove(temp);&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;and nothing happens. Anyone any ideas why? My project is on a standstill until i can solve this :(&lt;/div&gt;</description></item><item><title>Webcam Component for XNA</title><link>http://forums.xna.com/forums/thread/7275.aspx</link><pubDate>Fri, 27 Apr 2007 01:16:42 GMT</pubDate><guid isPermaLink="false">4aa5dbf6-357b-46b2-b5b2-1b660a6dc370:7275</guid><dc:creator>DangerousIdeas</dc:creator><slash:comments>10</slash:comments><comments>http://forums.xna.com/forums/thread/7275.aspx</comments><wfw:commentRss>http://forums.xna.com/forums/commentrss.aspx?SectionID=56&amp;PostID=7275</wfw:commentRss><description>&lt;P&gt;Keywords: XNA, Webcam Component, Video Component, Video Texture&lt;/P&gt;
&lt;P&gt;I have created a basic Webcam component for XNA that streams video onto a Texture2D, which can be used to draw on a sprite or geometry.&amp;nbsp;This component uses the DirectShow.NET library, which can be found at&amp;nbsp;&amp;nbsp;&lt;A href="http://sourceforge.net/projects/directshownet/"&gt;http://sourceforge.net/projects/directshownet/&lt;/A&gt;. &amp;nbsp;The component registers itself as a service in the game application, so downstream components should be able to use it as a normal service.&amp;nbsp; The zip of the project is available at:&lt;/P&gt;
&lt;P&gt;&lt;BR&gt;&lt;STRONG&gt;Download link&lt;/STRONG&gt; &lt;A href="http://upload2.net/page/download/DKNxt0oSK9ud1qL/xnaGame.zip.html"&gt;&lt;FONT color=#000080&gt;http://upload2.net/page/download/DKNxt0oSK9ud1qL/xnaGame.zip.html&lt;/FONT&gt;&lt;/A&gt;&lt;BR&gt;&lt;/P&gt;&lt;STRONG&gt;&lt;/STRONG&gt;
&lt;P&gt;&lt;STRONG&gt;Information about uploaded file:&lt;/STRONG&gt; &lt;BR&gt;Link Id: DKNxt0oSK9ud1qL&lt;BR&gt;File Name: xnaGame.zip&lt;BR&gt;Size: 510 Kb (523239 bytes)&lt;BR&gt;Uploaded: 2007-04-27 00:06:15&lt;/P&gt;
&lt;P&gt;&lt;BR&gt;&amp;nbsp;&lt;/P&gt;</description></item><item><title>Separate alpha masks</title><link>http://forums.xna.com/forums/thread/253731.aspx</link><pubDate>Sat, 21 Nov 2009 02:29:08 GMT</pubDate><guid isPermaLink="false">4aa5dbf6-357b-46b2-b5b2-1b660a6dc370:253731</guid><dc:creator>Ganryu</dc:creator><slash:comments>0</slash:comments><comments>http://forums.xna.com/forums/thread/253731.aspx</comments><wfw:commentRss>http://forums.xna.com/forums/commentrss.aspx?SectionID=56&amp;PostID=253731</wfw:commentRss><description>I&amp;#39;m working on a simple card game project and I want to render the cards in multiple layers. My main problem so far is that I cannot seem to figure out how to use an external alpha mask. Using an alpha channel is easy, but I do not want to work with the alpha channel stored in the image itself. The alpha mask should be a separate file altogether.&lt;br /&gt;
&lt;br /&gt;
Is this possible? If it is; how do I go about to do it?&lt;br /&gt;</description></item><item><title>Dynamic Rendering 2D objects into  2D Textures</title><link>http://forums.xna.com/forums/thread/111209.aspx</link><pubDate>Mon, 24 Nov 2008 02:19:50 GMT</pubDate><guid isPermaLink="false">4aa5dbf6-357b-46b2-b5b2-1b660a6dc370:111209</guid><dc:creator>mediahaze</dc:creator><slash:comments>4</slash:comments><comments>http://forums.xna.com/forums/thread/111209.aspx</comments><wfw:commentRss>http://forums.xna.com/forums/commentrss.aspx?SectionID=56&amp;PostID=111209</wfw:commentRss><description>&lt;span style="background-color:#f4f7f5;"&gt;Hello All,&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I want to do 2D rendering into textures that I can later use as masks onto a final texture.  &lt;span style="background-color:#f4f7f5;"&gt;Picture contracting, expanding or shrinking an elipse(or any other function) whose interior will serve as a mask for a base texture(crazy flames or strips). This would let me do interesting texture effects dynamically on textures for a characters face ect.&lt;br /&gt;
&lt;br /&gt;
Any ideas how to best do this dynamic drawing? The only way I can imagine this is to render using 3d primitives onto rendertaget and then use that as a texture mask. Of course is there is a way to do this in 2D I would love to hear it.&lt;br /&gt;
&lt;br /&gt;
Thanks in advance.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;
</description></item><item><title>Why do my games work my PC 100%?</title><link>http://forums.xna.com/forums/thread/253244.aspx</link><pubDate>Thu, 19 Nov 2009 22:04:51 GMT</pubDate><guid isPermaLink="false">4aa5dbf6-357b-46b2-b5b2-1b660a6dc370:253244</guid><dc:creator>Greg the Mad</dc:creator><slash:comments>4</slash:comments><comments>http://forums.xna.com/forums/thread/253244.aspx</comments><wfw:commentRss>http://forums.xna.com/forums/commentrss.aspx?SectionID=56&amp;PostID=253244</wfw:commentRss><description>Today I noticed something: When I start my Shader prototype game, the performance of the first core of my CPU goes up to 100%.&lt;div&gt;And when I looked, I saw that this happens with all my games I&amp;#39;ve written in the past, no matter how simple they display two sprites.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Why do those simple programs drive my PC to peak performance while professional games (like Dragon Age Origins) stay around 80% on one core and less on the others.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;I have a 4-Core Processor, so I don&amp;#39;t mind the loss of one core (performance wise), but I&amp;#39;m still concerned about that, especially when I write a new Shader and want to check its performance.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Any clues?&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Greg the Mad&lt;/div&gt;</description></item><item><title>Components List Problem</title><link>http://forums.xna.com/forums/thread/253552.aspx</link><pubDate>Fri, 20 Nov 2009 16:33:02 GMT</pubDate><guid isPermaLink="false">4aa5dbf6-357b-46b2-b5b2-1b660a6dc370:253552</guid><dc:creator>Gizoku</dc:creator><slash:comments>4</slash:comments><comments>http://forums.xna.com/forums/thread/253552.aspx</comments><wfw:commentRss>http://forums.xna.com/forums/commentrss.aspx?SectionID=56&amp;PostID=253552</wfw:commentRss><description>Hi all,&lt;br /&gt;
&lt;br /&gt;
I&amp;#39;m using XNA to make an asteroids clone (asteroids meets Geometry Wars, original I know...) and I&amp;#39;m having trouble initiating new waves of asteroids. When an asteroid is destroyed it is removed from the game components list. I basically need something like this:&lt;br /&gt;
&lt;br /&gt;
if(Components.ASTEROIDS.Count == 0)&lt;br /&gt;
{&lt;br /&gt;
&lt;br /&gt;
wave += 1&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
I&amp;#39;m just not sure of the syntax...&lt;br /&gt;
&lt;br /&gt;
Any help anyone can offer would be greatly appreciated :D&lt;br /&gt;
&lt;br /&gt;
Thanks!</description></item><item><title>Transparency Issue</title><link>http://forums.xna.com/forums/thread/253448.aspx</link><pubDate>Fri, 20 Nov 2009 11:43:23 GMT</pubDate><guid isPermaLink="false">4aa5dbf6-357b-46b2-b5b2-1b660a6dc370:253448</guid><dc:creator>Shahin</dc:creator><slash:comments>7</slash:comments><comments>http://forums.xna.com/forums/thread/253448.aspx</comments><wfw:commentRss>http://forums.xna.com/forums/commentrss.aspx?SectionID=56&amp;PostID=253448</wfw:commentRss><description>Hi,&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;I have a problem with transparency.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;I&amp;#39;m drawing multiple tiles on the screen and some of these overl&lt;span style="white-space:pre;"&gt;ap, effecting their transparency, here are a few images to help with understanding the problem&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;img alt="" src="http://www.notspike.com/dump/solid.png" /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;img alt="" src="http://www.notspike.com/dump/transparent.png" /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="white-space:pre;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="white-space:pre;"&gt;the first image has no transparency, this is just to show you what I&amp;#39;m making transparent, stacked blocks like in the picture.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="white-space:pre;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="white-space:pre;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="white-space:pre;"&gt;In the second picture the transparency is applied using new Color(Color, 0.5f); on the draw&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="white-space:pre;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="white-space:pre;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="white-space:pre;"&gt;I need to get all the transparency the same, so it doesn&amp;#39;t take into account what it&amp;#39;s overlapping and at the opaqueness together.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="white-space:pre;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="white-space:pre;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="white-space:pre;"&gt;Help please =]&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="white-space:pre;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;</description></item><item><title>fixedTimeStep giving problems on Xbox</title><link>http://forums.xna.com/forums/thread/253454.aspx</link><pubDate>Fri, 20 Nov 2009 11:57:57 GMT</pubDate><guid isPermaLink="false">4aa5dbf6-357b-46b2-b5b2-1b660a6dc370:253454</guid><dc:creator>SkyWhy</dc:creator><slash:comments>1</slash:comments><comments>http://forums.xna.com/forums/thread/253454.aspx</comments><wfw:commentRss>http://forums.xna.com/forums/commentrss.aspx?SectionID=56&amp;PostID=253454</wfw:commentRss><description>Hello everyone.&lt;br /&gt;
&lt;br /&gt;
I&amp;#39;m having interesting problems with the game I&amp;#39;m working on with three others programmers. It&amp;#39;s going to a Xbox game, 2.5D. Currently we are running the game in fixedTimeStep = false; so we won&amp;#39;t be &amp;quot;locked&amp;quot; to certain fps. We are using deltaTime(difference between updates) to achieve same movement speed on varying FPS. But all goes horribly wrong when we try to import our game to Xbox. &lt;br /&gt;
&lt;br /&gt;
The game runs 60fps on PC but on XBox it&amp;#39;s 16FPS. It&amp;#39;s not like it&amp;#39;s power hog or anything, we got just seven platforms (basic boxes) and four models on the screen (really low poly) and it&amp;#39;s choking. It can&amp;#39;t be our code, seems unrealistic. So we turned the &amp;quot;isFixedTimeStep&amp;quot; to true (which it is by default) and the game ran at 60fps but the movement was horrid.&lt;br /&gt;
&lt;br /&gt;
Where could have we gone wrong? &lt;br /&gt;
Any ideas how to maintain high FPS on xbox and how to achieve smooth movement?&lt;br /&gt;
&lt;br /&gt;
Cheers.&lt;br /&gt;</description></item><item><title>Enemy Movement - Basic Space Invaders-Esque game</title><link>http://forums.xna.com/forums/thread/252730.aspx</link><pubDate>Wed, 18 Nov 2009 14:42:20 GMT</pubDate><guid isPermaLink="false">4aa5dbf6-357b-46b2-b5b2-1b660a6dc370:252730</guid><dc:creator>LaChavvy</dc:creator><slash:comments>2</slash:comments><comments>http://forums.xna.com/forums/thread/252730.aspx</comments><wfw:commentRss>http://forums.xna.com/forums/commentrss.aspx?SectionID=56&amp;PostID=252730</wfw:commentRss><description>Hello,&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;I&amp;#39;m having trouble with simple enemy movement in a space invaders type game. What I want is the enemies to move from one side to another, and so I wrote the following code, yet it doesnt seem to work? &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Variable clarification:&lt;/div&gt;&lt;div&gt;enemy[i] - an array of enemies, like space invaders they are in a square formation of 20 enemies&lt;/div&gt;&lt;div&gt;getOriginaPos - as the enemies are in different positions, I couldn&amp;#39;t just specify a static number&lt;/div&gt;&lt;div&gt;velocity - constant variable&lt;/div&gt;&lt;div&gt;timedelta - float variant of gameTime&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Any help would be appreciated.&lt;/div&gt;&lt;div&gt;Thanks&lt;/div&gt;&lt;div&gt;&lt;div&gt; &lt;/div&gt;&lt;div style="overflow-x:auto;overflow-y:auto;background-color:white;border-top-style:solid;border-right-style:solid;border-bottom-style:solid;border-left-style:solid;border-top-width:1px;border-right-width:1px;border-bottom-width:1px;border-left-width:1px;border-top-color:#7f9db9;border-right-color:#7f9db9;border-bottom-color:#7f9db9;border-left-color:#7f9db9;font-family:&amp;#39;courier new&amp;#39;;font-size:11px;"&gt;&lt;table cellpadding="0" cellspacing="0" style="width:99%;margin-top:2px;margin-right:0px;margin-bottom:2px;margin-left:0px;border-collapse:collapse;border-bottom-style:solid;border-bottom-color:#eeeeee;background-color:#ffffff;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;"&gt;                &lt;tr&gt;            &lt;td&gt;&lt;span style="font-size:11px;"&gt;            &lt;/span&gt;&lt;span style="color:blue;"&gt;for&lt;/span&gt;&lt;span style="font-size:11px;"&gt; (&lt;/span&gt;&lt;span style="color:blue;"&gt;int&lt;/span&gt;&lt;span style="font-size:11px;"&gt; i = 0; i &amp;lt; 20; i++) &lt;/span&gt;&lt;/td&gt;        &lt;/tr&gt;        &lt;tr&gt;            &lt;td style="background-color:#f7f7f7;"&gt;            { &lt;/td&gt;        &lt;/tr&gt;        &lt;tr&gt;            &lt;td&gt;                &lt;span style="color:blue;"&gt;if&lt;/span&gt;&lt;span style="font-size:11px;"&gt; (enemy[i].position.X &amp;lt; enemy[i].getOriginalPos() + 5.0f) &lt;/span&gt;&lt;/td&gt;        &lt;/tr&gt;        &lt;tr&gt;            &lt;td style="background-color:#f7f7f7;"&gt;                { &lt;/td&gt;        &lt;/tr&gt;        &lt;tr&gt;            &lt;td&gt;                        enemy[i].position.X += velocity * timeDelta; &lt;/td&gt;        &lt;/tr&gt;        &lt;tr&gt;            &lt;td style="background-color:#f7f7f7;"&gt;                } &lt;/td&gt;        &lt;/tr&gt;        &lt;tr&gt;            &lt;td&gt;                changeDirection = &lt;span style="color:blue;"&gt;true&lt;/span&gt;&lt;span style="font-size:11px;"&gt;; &lt;/span&gt;&lt;/td&gt;        &lt;/tr&gt;        &lt;tr&gt;            &lt;td style="background-color:#f7f7f7;"&gt;            } &lt;/td&gt;        &lt;/tr&gt;        &lt;tr&gt;            &lt;td&gt; &lt;/td&gt;        &lt;/tr&gt;        &lt;tr&gt;            &lt;td style="background-color:#f7f7f7;"&gt;            &lt;span style="color:blue;"&gt;if&lt;/span&gt;&lt;span style="font-size:11px;"&gt; (changeDirection == &lt;/span&gt;&lt;span style="color:blue;"&gt;true&lt;/span&gt;&lt;span style="font-size:11px;"&gt;) &lt;/span&gt;&lt;/td&gt;        &lt;/tr&gt;        &lt;tr&gt;            &lt;td&gt;            { &lt;/td&gt;        &lt;/tr&gt;        &lt;tr&gt;            &lt;td style="background-color:#f7f7f7;"&gt;                &lt;span style="color:blue;"&gt;for&lt;/span&gt;&lt;span style="font-size:11px;"&gt; (&lt;/span&gt;&lt;span style="color:blue;"&gt;int&lt;/span&gt;&lt;span style="font-size:11px;"&gt; i = 0; i &amp;lt; 20; i++) &lt;/span&gt;&lt;/td&gt;        &lt;/tr&gt;        &lt;tr&gt;            &lt;td&gt;                { &lt;/td&gt;        &lt;/tr&gt;        &lt;tr&gt;            &lt;td style="background-color:#f7f7f7;"&gt;                    &lt;span style="color:blue;"&gt;if&lt;/span&gt;&lt;span style="font-size:11px;"&gt;(enemy[i].position.X &amp;gt; enemy[i].getOriginalPos() - 5.0f) &lt;/span&gt;&lt;/td&gt;        &lt;/tr&gt;        &lt;tr&gt;            &lt;td&gt;                    { &lt;/td&gt;        &lt;/tr&gt;        &lt;tr&gt;            &lt;td style="background-color:#f7f7f7;"&gt;                        enemy[i].position.X -= velocity * timeDelta; &lt;/td&gt;        &lt;/tr&gt;        &lt;tr&gt;            &lt;td&gt;                    } &lt;/td&gt;        &lt;/tr&gt;        &lt;tr&gt;            &lt;td style="background-color:#f7f7f7;"&gt;                } &lt;/td&gt;        &lt;/tr&gt;        &lt;tr&gt;            &lt;td&gt;            } &lt;/td&gt;        &lt;/tr&gt;    &lt;/table&gt;&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;/div&gt;</description></item><item><title>File not found error</title><link>http://forums.xna.com/forums/thread/253348.aspx</link><pubDate>Fri, 20 Nov 2009 03:00:41 GMT</pubDate><guid isPermaLink="false">4aa5dbf6-357b-46b2-b5b2-1b660a6dc370:253348</guid><dc:creator>Axiom Games</dc:creator><slash:comments>2</slash:comments><comments>http://forums.xna.com/forums/thread/253348.aspx</comments><wfw:commentRss>http://forums.xna.com/forums/commentrss.aspx?SectionID=56&amp;PostID=253348</wfw:commentRss><description>Hey guys,&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;I&amp;#39;m trying out XNA&amp;#39;s 2D tutorial and this should be a very simple task, however the debugger reports that the file background.xmb cannot be found. Here is the part of my code that the error is received on:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div style="overflow-x:auto;overflow-y:auto;background-color:white;border-top-style:solid;border-right-style:solid;border-bottom-style:solid;border-left-style:solid;border-top-width:1px;border-right-width:1px;border-bottom-width:1px;border-left-width:1px;border-top-color:#7f9db9;border-right-color:#7f9db9;border-bottom-color:#7f9db9;border-left-color:#7f9db9;font-family:&amp;#39;courier new&amp;#39;;font-size:11px;"&gt;&lt;table cellpadding="0" cellspacing="0" style="width:99%;margin-top:2px;margin-right:0px;margin-bottom:2px;margin-left:0px;border-collapse:collapse;border-bottom-style:solid;border-bottom-color:#eeeeee;background-color:#ffffff;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;"&gt;                &lt;tr&gt;            &lt;td&gt;&lt;span style="font-size:11px;"&gt;            backgroundTexture = Content.Load&amp;lt;Texture2D&amp;gt;( &lt;/span&gt;&lt;/td&gt;        &lt;/tr&gt;        &lt;tr&gt;            &lt;td style="background-color:#f7f7f7;"&gt;                &lt;span style="color:blue;"&gt;&amp;quot;Sprites\\background&amp;quot;&lt;/span&gt;&lt;span style="font-size:11px;"&gt;); &lt;/span&gt;&lt;/td&gt;        &lt;/tr&gt;    &lt;/table&gt;&lt;/div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Also, here is the error message:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;Microsoft.Xna.Framework.Content.ContentLoadException was unhandled&lt;/div&gt;&lt;div&gt;  Message=&amp;quot;Error loading \&amp;quot;Sprites\\background\&amp;quot;. File not found.&amp;quot;&lt;/div&gt;&lt;div&gt;  Source=&amp;quot;Microsoft.Xna.Framework&amp;quot;&lt;/div&gt;&lt;div&gt;  StackTrace:&lt;/div&gt;&lt;div&gt;       at Microsoft.Xna.Framework.Content.ContentManager.OpenStream(String assetName)&lt;/div&gt;&lt;div&gt;       at Microsoft.Xna.Framework.Content.ContentManager.ReadAsset[T](String assetName, Action`1 recordDisposableObject)&lt;/div&gt;&lt;div&gt;       at Microsoft.Xna.Framework.Content.ContentManager.Load[T](String assetName)&lt;/div&gt;&lt;div&gt;       at XNA_Learning_001.Game1..ctor() in C:\Users\Emmanuel\Documents\Visual Studio 2008\Projects\XNA_Learning_001\XNA_Learning_001\Game1.cs:line 32&lt;/div&gt;&lt;div&gt;       at XNA_Learning_001.Program.Main(String[] args) in C:\Users\Emmanuel\Documents\Visual Studio 2008\Projects\XNA_Learning_001\XNA_Learning_001\Program.cs:line 12&lt;/div&gt;&lt;div&gt;  InnerException: System.IO.DirectoryNotFoundException&lt;/div&gt;&lt;div&gt;       Message=&amp;quot;Could not find a part of the path &amp;#39;C:\\Users\\Emmanuel\\Documents\\Visual Studio 2008\\Projects\\XNA_Learning_001\\XNA_Learning_001\\bin\\x86\\Debug\\Sprites\\background.xnb&amp;#39;.&amp;quot;&lt;/div&gt;&lt;div&gt;       Source=&amp;quot;mscorlib&amp;quot;&lt;/div&gt;&lt;div&gt;       StackTrace:&lt;/div&gt;&lt;div&gt;            at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)&lt;/div&gt;&lt;div&gt;            at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy)&lt;/div&gt;&lt;div&gt;            at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share)&lt;/div&gt;&lt;div&gt;            at Microsoft.Xna.Framework.Content.ContentManager.OpenStream(String assetName)&lt;/div&gt;&lt;div&gt;       InnerException: &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;I&amp;#39;ve checked myself and the file is in fact inside &amp;#39;C:\\Users\\Emmanuel\\Documents\\Visual Studio 2008\\Projects\\XNA_Learning_001\\XNA_Learning_001\\bin\\x86\\Debug\\Sprites\\background.xnb&amp;#39;&lt;/div&gt;&lt;div&gt;therefor I have no idea why it is giving me this error message. &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;I bet it is something very simple, however I just can see it.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Cheers,&lt;/div&gt;&lt;/div&gt;</description></item><item><title>Problems creating a Texture2D from a HTTP stream</title><link>http://forums.xna.com/forums/thread/99143.aspx</link><pubDate>Wed, 22 Oct 2008 11:43:06 GMT</pubDate><guid isPermaLink="false">4aa5dbf6-357b-46b2-b5b2-1b660a6dc370:99143</guid><dc:creator>ljbade</dc:creator><slash:comments>7</slash:comments><comments>http://forums.xna.com/forums/thread/99143.aspx</comments><wfw:commentRss>http://forums.xna.com/forums/commentrss.aspx?SectionID=56&amp;PostID=99143</wfw:commentRss><description>&lt;p&gt;I am trying to load some images via HTTP streams into a Texture2D.&lt;/p&gt;
&lt;p&gt;The code I have written uses a HttpWebRequest to get a Stream from a URL. It then reads that Stream into a MemoryStream, and passes the MemoryStream into Texture2D.FromFile which keeps chucking out an InvalidOperationException:&lt;/p&gt;
&lt;p&gt;System.InvalidOperationException was unhandled&lt;br /&gt;
&amp;nbsp; Message=&amp;quot;An unexpected error has occurred.&amp;quot;&lt;br /&gt;
&amp;nbsp; Source=&amp;quot;Microsoft.Xna.Framework&amp;quot;&lt;br /&gt;
&amp;nbsp; StackTrace:&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at Microsoft.Xna.Framework.Graphics.Texture.GetTextureInformation(String filename)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at Microsoft.Xna.Framework.Graphics.Texture.FromFile(GraphicsDevice graphicsDevice, String filename)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at Microsoft.Xna.Framework.Graphics.Texture.FromFile(GraphicsDevice graphicsDevice, Stream textureStream, Int32 numberBytes)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at Microsoft.Xna.Framework.Graphics.Texture2D.FromFile(GraphicsDevice graphicsDevice, Stream textureStream)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at XNAVirtualEarth.WebImage..ctor(Game game, String uri) in C:\Documents and Settings\Leith Bade\My Documents\Visual Studio 2008\Projects\XNAVirtualEarth\XNAVirtualEarth\WebImage.cs:line 38&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at XNAVirtualEarth.Game1.LoadContent() in C:\Documents and Settings\Leith Bade\My Documents\Visual Studio 2008\Projects\XNAVirtualEarth\XNAVirtualEarth\Game1.cs:line 51&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at Microsoft.Xna.Framework.Game.Initialize()&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at XNAVirtualEarth.Game1.Initialize() in C:\Documents and Settings\Leith Bade\My Documents\Visual Studio 2008\Projects\XNAVirtualEarth\XNAVirtualEarth\Game1.cs:line 39&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at Microsoft.Xna.Framework.Game.Run()&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at XNAVirtualEarth.Program.Main(String[ args) in C:\Documents and Settings\Leith Bade\My Documents\Visual Studio 2008\Projects\XNAVirtualEarth\XNAVirtualEarth\Program.cs:line 14&lt;br /&gt;
&amp;nbsp; InnerException: &lt;/p&gt;
&lt;p&gt;Here is the code that creates the Texture2D:&lt;/p&gt;
&lt;div style="BORDER-BOTTOM:#7f9db9 1px solid;BORDER-LEFT:#7f9db9 1px solid;BACKGROUND-COLOR:white;WIDTH:100%;FONT-FAMILY:Courier New;HEIGHT:188px;FONT-SIZE:11px;OVERFLOW:auto;BORDER-TOP:#7f9db9 1px solid;BORDER-RIGHT:#7f9db9 1px solid;"&gt;
&lt;table style="BORDER-BOTTOM:#eee 0px solid;BORDER-RIGHT-WIDTH:0px;BACKGROUND-COLOR:#fff;MARGIN:2px 0px;WIDTH:99%;BORDER-COLLAPSE:collapse;BORDER-TOP-WIDTH:0px;BORDER-LEFT-WIDTH:0px;" cellspacing="0" cellpadding="0"&gt;
    
    
    
        &lt;tr&gt;
            &lt;td&gt;&lt;font style="FONT-SIZE:11px;"&gt;HttpWebRequest&amp;nbsp;request&amp;nbsp;=&amp;nbsp;(HttpWebRequest)WebRequest.Create(uri); &amp;nbsp;&lt;/font&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td style="BACKGROUND-COLOR:#f7f7f7;"&gt;HttpWebResponse&amp;nbsp;response&amp;nbsp;=&amp;nbsp;(HttpWebResponse)request.GetResponse(); &amp;nbsp;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td&gt;Stream&amp;nbsp;webStream&amp;nbsp;=&amp;nbsp;response.GetResponseStream(); &amp;nbsp;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td style="BACKGROUND-COLOR:#f7f7f7;"&gt;&amp;nbsp;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td&gt;Stream&amp;nbsp;cachedStream&amp;nbsp;=&amp;nbsp;CacheStream(webStream); &amp;nbsp;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td style="BACKGROUND-COLOR:#f7f7f7;"&gt;&amp;nbsp;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td&gt;webStream.Close(); &amp;nbsp;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td style="BACKGROUND-COLOR:#f7f7f7;"&gt;response.Close(); &amp;nbsp;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td&gt;&amp;nbsp;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td style="BACKGROUND-COLOR:#f7f7f7;"&gt;texture&amp;nbsp;=&amp;nbsp;Texture2D.FromFile(Game.GraphicsDevice,&amp;nbsp;cachedStream); &amp;nbsp;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td&gt;&amp;nbsp;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td style="BACKGROUND-COLOR:#f7f7f7;"&gt;cachedStream.Close();&amp;nbsp;&lt;/td&gt;
        &lt;/tr&gt;
    
&lt;/table&gt;
&lt;/div&gt;
&lt;p&gt;Here is CacheStream:&lt;/p&gt;
&lt;div style="BORDER-BOTTOM:#7f9db9 1px solid;BORDER-LEFT:#7f9db9 1px solid;BACKGROUND-COLOR:white;WIDTH:100%;FONT-FAMILY:Courier New;HEIGHT:244px;FONT-SIZE:11px;OVERFLOW:auto;BORDER-TOP:#7f9db9 1px solid;BORDER-RIGHT:#7f9db9 1px solid;"&gt;
&lt;table style="BORDER-BOTTOM:#eee 0px solid;BORDER-RIGHT-WIDTH:0px;BACKGROUND-COLOR:#fff;MARGIN:2px 0px;WIDTH:99%;BORDER-COLLAPSE:collapse;BORDER-TOP-WIDTH:0px;BORDER-LEFT-WIDTH:0px;" cellspacing="0" cellpadding="0"&gt;
    
    
    
        &lt;tr&gt;
            &lt;td&gt;&lt;font style="FONT-SIZE:11px;"&gt;Stream&amp;nbsp;CacheStream(Stream&amp;nbsp;stream) &amp;nbsp;&lt;/font&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td style="BACKGROUND-COLOR:#f7f7f7;"&gt;{ &amp;nbsp;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Stream&amp;nbsp;cachedStream&amp;nbsp;=&amp;nbsp;&lt;/font&gt;&lt;font style="COLOR:blue;"&gt;new&lt;/font&gt;&lt;font style="FONT-SIZE:11px;"&gt;&amp;nbsp;MemoryStream(); &amp;nbsp;&lt;/font&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td style="BACKGROUND-COLOR:#f7f7f7;"&gt;&amp;nbsp;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/font&gt;&lt;font style="COLOR:blue;"&gt;const&lt;/font&gt;&lt;font style="FONT-SIZE:11px;"&gt;&amp;nbsp;&lt;/font&gt;&lt;font style="COLOR:blue;"&gt;int&lt;/font&gt;&lt;font style="FONT-SIZE:11px;"&gt;&amp;nbsp;bufferSize&amp;nbsp;=&amp;nbsp;1500; &amp;nbsp;&lt;/font&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td style="BACKGROUND-COLOR:#f7f7f7;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/font&gt;&lt;font style="COLOR:blue;"&gt;byte&lt;/font&gt;&lt;font style="FONT-SIZE:11px;"&gt;[&amp;nbsp;buffer&amp;nbsp;=&amp;nbsp;&lt;/font&gt;&lt;font style="COLOR:blue;"&gt;new&lt;/font&gt;&lt;font style="FONT-SIZE:11px;"&gt;&amp;nbsp;&lt;/font&gt;&lt;font style="COLOR:blue;"&gt;byte&lt;/font&gt;&lt;font style="FONT-SIZE:11px;"&gt;[bufferSize]; &amp;nbsp;&lt;/font&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td&gt;&amp;nbsp;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td style="BACKGROUND-COLOR:#f7f7f7;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/font&gt;&lt;font style="COLOR:blue;"&gt;int&lt;/font&gt;&lt;font style="FONT-SIZE:11px;"&gt;&amp;nbsp;read&amp;nbsp;=&amp;nbsp;0; &amp;nbsp;&lt;/font&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td&gt;&amp;nbsp;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td style="BACKGROUND-COLOR:#f7f7f7;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/font&gt;&lt;font style="COLOR:blue;"&gt;while&lt;/font&gt;&lt;font style="FONT-SIZE:11px;"&gt;&amp;nbsp;((read&amp;nbsp;=&amp;nbsp;stream.Read(buffer,&amp;nbsp;0,&amp;nbsp;bufferSize))&amp;nbsp;!=&amp;nbsp;0) &amp;nbsp;&lt;/font&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{ &amp;nbsp;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td style="BACKGROUND-COLOR:#f7f7f7;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;cachedStream.Write(buffer,&amp;nbsp;0,&amp;nbsp;read); &amp;nbsp;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;} &amp;nbsp;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td style="BACKGROUND-COLOR:#f7f7f7;"&gt;&amp;nbsp;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/font&gt;&lt;font style="COLOR:blue;"&gt;return&lt;/font&gt;&lt;font style="FONT-SIZE:11px;"&gt;&amp;nbsp;cachedStream; &amp;nbsp;&lt;/font&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td style="BACKGROUND-COLOR:#f7f7f7;"&gt;}&amp;nbsp;&lt;/td&gt;
        &lt;/tr&gt;
    
&lt;/table&gt;
&lt;/div&gt;
&lt;p&gt;I have tried with PNGs (with and without transparency) and JPEG, none of which work.&lt;/p&gt;
&lt;p&gt;Someone here must know whats going on.&lt;/p&gt;
</description></item><item><title>Matrix problems</title><link>http://forums.xna.com/forums/thread/244115.aspx</link><pubDate>Tue, 27 Oct 2009 11:59:01 GMT</pubDate><guid isPermaLink="false">4aa5dbf6-357b-46b2-b5b2-1b660a6dc370:244115</guid><dc:creator>Stainless</dc:creator><slash:comments>18</slash:comments><comments>http://forums.xna.com/forums/thread/244115.aspx</comments><wfw:commentRss>http://forums.xna.com/forums/commentrss.aspx?SectionID=56&amp;PostID=244115</wfw:commentRss><description>I have a vertex buffer of points which I am trying to map to the screen.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The points start out ranging from {-60,-60,0} to {60,60,0}, they can be moved, but in the default case I want that to match to the screen.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;In my setup I work out my matrices like this.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div style="overflow-x:auto;overflow-y:auto;background-color:white;border-top-style:solid;border-right-style:solid;border-bottom-style:solid;border-left-style:solid;border-top-width:1px;border-right-width:1px;border-bottom-width:1px;border-left-width:1px;border-top-color:#7f9db9;border-right-color:#7f9db9;border-bottom-color:#7f9db9;border-left-color:#7f9db9;font-family:&amp;#39;courier new&amp;#39;;font-size:11px;"&gt;&lt;table cellpadding="0" cellspacing="0" style="width:99%;margin-top:2px;margin-right:0px;margin-bottom:2px;margin-left:0px;border-collapse:collapse;border-bottom-style:solid;border-bottom-color:#eeeeee;background-color:#ffffff;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;"&gt;                &lt;tr&gt;            &lt;td&gt;&lt;span style="font-size:11px;"&gt;            &lt;/span&gt;&lt;span style="color:blue;"&gt;double&lt;/span&gt;&lt;span style="font-size:11px;"&gt; fov = 2.0f* Math.Atan((&lt;/span&gt;&lt;span style="color:blue;"&gt;double&lt;/span&gt;&lt;span style="font-size:11px;"&gt;)ScreenWidth / (&lt;/span&gt;&lt;span style="color:blue;"&gt;double&lt;/span&gt;&lt;span style="font-size:11px;"&gt;)ScreenHeight); &lt;/span&gt;&lt;/td&gt;        &lt;/tr&gt;        &lt;tr&gt;            &lt;td style="background-color:#f7f7f7;"&gt;            &lt;span style="color:blue;"&gt;float&lt;/span&gt;&lt;span style="font-size:11px;"&gt; Z = -60.0f / (&lt;/span&gt;&lt;span style="color:blue;"&gt;float&lt;/span&gt;&lt;span style="font-size:11px;"&gt;)Math.Tan(fov / 2.0f); &lt;/span&gt;&lt;/td&gt;        &lt;/tr&gt;        &lt;tr&gt;            &lt;td&gt;            Matrix dcr = Matrix.CreateFromYawPitchRoll(0, MathHelper.ToRadians(90), 0); &lt;/td&gt;        &lt;/tr&gt;        &lt;tr&gt;            &lt;td style="background-color:#f7f7f7;"&gt;            CameraPosition = Vector3.Transform(&lt;span style="color:blue;"&gt;new&lt;/span&gt;&lt;span style="font-size:11px;"&gt; Vector3(0,0,Z), dcr); &lt;/span&gt;&lt;/td&gt;        &lt;/tr&gt;        &lt;tr&gt;            &lt;td&gt;            View = Matrix.CreateLookAt(CameraPosition, Vector3.Zero, Vector3.Up); &lt;/td&gt;        &lt;/tr&gt;        &lt;tr&gt;            &lt;td style="background-color:#f7f7f7;"&gt;            Projection = Matrix.CreatePerspectiveFieldOfView((&lt;span style="color:blue;"&gt;float&lt;/span&gt;&lt;span style="font-size:11px;"&gt;)fov, (&lt;/span&gt;&lt;span style="color:blue;"&gt;float&lt;/span&gt;&lt;span style="font-size:11px;"&gt;)ScreenWidth / (&lt;/span&gt;&lt;span style="color:blue;"&gt;float&lt;/span&gt;&lt;span style="font-size:11px;"&gt;)ScreenHeight, 1, 12000); &lt;/span&gt;&lt;/td&gt;        &lt;/tr&gt;        &lt;tr&gt;            &lt;td&gt; &lt;/td&gt;        &lt;/tr&gt;    &lt;/table&gt;&lt;/div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Which, I thought would map the unmodified mesh to the viewport, but what I get is the bottom slightly off screen, and the width of the displayed mesh a lot smaller than the screen.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Any ideas what I am doing wrong?&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;</description></item><item><title>Slicing a Texture2D </title><link>http://forums.xna.com/forums/thread/253232.aspx</link><pubDate>Thu, 19 Nov 2009 21:34:26 GMT</pubDate><guid isPermaLink="false">4aa5dbf6-357b-46b2-b5b2-1b660a6dc370:253232</guid><dc:creator>LucasSimao</dc:creator><slash:comments>5</slash:comments><comments>http://forums.xna.com/forums/thread/253232.aspx</comments><wfw:commentRss>http://forums.xna.com/forums/commentrss.aspx?SectionID=56&amp;PostID=253232</wfw:commentRss><description>Hi,&lt;br /&gt;
this is my problem: I have a Texture2D object with multiples sprites ( a spritesheet ), i would like to &lt;span class="dct-tt"&gt;pick out&lt;/span&gt; a region of the such Texture2D object and generate another Texture2D object with only the region that i need. How i do it?&lt;br /&gt;</description></item><item><title>XNA and F#</title><link>http://forums.xna.com/forums/thread/252782.aspx</link><pubDate>Wed, 18 Nov 2009 18:21:21 GMT</pubDate><guid isPermaLink="false">4aa5dbf6-357b-46b2-b5b2-1b660a6dc370:252782</guid><dc:creator>johdex</dc:creator><slash:comments>7</slash:comments><comments>http://forums.xna.com/forums/thread/252782.aspx</comments><wfw:commentRss>http://forums.xna.com/forums/commentrss.aspx?SectionID=56&amp;PostID=252782</wfw:commentRss><description>Hi,&lt;br /&gt;
&lt;br /&gt;
I have been working on a game using F# for some time. Things stopped working on the XBox when I upgraded F# to the October 2009 CTP. The problem is being discussed on &lt;a href="http://cs.hubfs.net/forums/thread/11482.aspx"&gt;HubFS&lt;/a&gt;, but I thought I might also ask here.&lt;br /&gt;
&lt;br /&gt;
Building an F# assembly to use in an XNA game on the XBox used to be easy: Adding references to the XNA assemblies for XBox to the F# project would do it, as long as one did not need anything specific to the XBox (e.g. SetProcessorAffinity()).&lt;br /&gt;
&lt;br /&gt;
That no longer works. I now get an exception when the game enters the F# code:&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote&gt;An unhandled exception of type &amp;#39;System.TypeLoadException&amp;#39; occurred in Unknown Module.
&lt;br /&gt;
&lt;br /&gt;
Additional information: La version de l&amp;#39;assembly System,
Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089 ne
peut pas être chargée par cette version du Microsoft .NET Compact
Framework.&lt;br /&gt;
&lt;/blockquote&gt;
&lt;br /&gt;
I understand that the XBox refuses to load any System.dll other than its own, but how come I am getting this error only now, with the new version of F#?</description></item><item><title>Song loading problem + networking question</title><link>http://forums.xna.com/forums/thread/252480.aspx</link><pubDate>Tue, 17 Nov 2009 20:39:00 GMT</pubDate><guid isPermaLink="false">4aa5dbf6-357b-46b2-b5b2-1b660a6dc370:252480</guid><dc:creator>MrSoundless</dc:creator><slash:comments>7</slash:comments><comments>http://forums.xna.com/forums/thread/252480.aspx</comments><wfw:commentRss>http://forums.xna.com/forums/commentrss.aspx?SectionID=56&amp;PostID=252480</wfw:commentRss><description>Hi all, I got a weirdo problem with the Song class..&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The problem is that everytime I load a Song the whole game starts to lag a LOT. The weird part is that it actually lags AFTER the loading is done. Also I&amp;#39;m doing all resource loading in a seperate thread including those songs and that doesn&amp;#39;t seem to change anything, which means the whole game still lags.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;I do nothing special when loading the song just something like this:&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:verdana, arial, helvetica, sans-serif;border-collapse:separate;font-size:13px;line-height:normal;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:verdana, arial, helvetica, sans-serif;border-collapse:separate;font-size:13px;line-height:normal;"&gt;&lt;div style="overflow-x:auto;overflow-y:auto;background-color:white;border-top-style:solid;border-right-style:solid;border-bottom-style:solid;border-left-style:solid;border-top-width:1px;border-right-width:1px;border-bottom-width:1px;border-left-width:1px;border-top-color:#7f9db9;border-right-color:#7f9db9;border-bottom-color:#7f9db9;border-left-color:#7f9db9;font-family:&amp;#39;courier new&amp;#39;;font-size:11px;"&gt;&lt;table cellpadding="0" cellspacing="0" style="width:99%;margin-top:2px;margin-right:0px;margin-bottom:2px;margin-left:0px;border-collapse:collapse;border-bottom-style:solid;border-bottom-color:#eeeeee;background-color:#ffffff;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;"&gt;                &lt;tr&gt;            &lt;td&gt;&lt;span style="font-size:11px;"&gt;Song mySong;  &lt;/span&gt;&lt;/td&gt;        &lt;/tr&gt;        &lt;tr&gt;            &lt;td style="background-color:#f7f7f7;"&gt;...  &lt;/td&gt;        &lt;/tr&gt;        &lt;tr&gt;            &lt;td&gt;myLoadMethod()  &lt;/td&gt;        &lt;/tr&gt;        &lt;tr&gt;            &lt;td style="background-color:#f7f7f7;"&gt;{  &lt;/td&gt;        &lt;/tr&gt;        &lt;tr&gt;            &lt;td&gt;    mySong = Content.Load&amp;lt;Song&amp;gt;(&lt;span style="color:blue;"&gt;&amp;quot;myMp3&amp;quot;&lt;/span&gt;&lt;span style="font-size:11px;"&gt;);  &lt;/span&gt;&lt;/td&gt;        &lt;/tr&gt;        &lt;tr&gt;            &lt;td style="background-color:#f7f7f7;"&gt;}  &lt;/td&gt;        &lt;/tr&gt;    &lt;/table&gt;&lt;/div&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;I have no clue why this happens. If I just create an empty project and load a song it doesn&amp;#39;t lag at all. But if I use my Lib (which is basically a mod of the GameStateManagement example + more) or when I use the GameStateManagement example it just goes all nuts...&lt;/div&gt;&lt;div&gt;If someone experienced something like this or has an idea what could be wrong, I&amp;#39;ll be very thankful if you post your &amp;#39;story&amp;#39;. If you know the solution I&amp;#39;ll be more then thankful..&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;sub&gt;p.s. I believe I also tried wma&amp;#39;s and still had the same problem, so I don&amp;#39;t think it&amp;#39;s the filetype but I could be wrong of course...&lt;/sub&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The 2nd thing I&amp;#39;d like to ask is about networking:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;I&amp;#39;m trying to do some networking (for the first time) and I can&amp;#39;t seem to find out how to send &amp;#39;global&amp;#39; data, which actually means I&amp;#39;m trying to send data to &amp;#39;anyone&amp;#39; who has the game. I&amp;#39;m sure there is SOME way to do this or at least a way to do something similar.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;/div&gt;</description></item><item><title>Fullscreen Resolution Ranking</title><link>http://forums.xna.com/forums/thread/251077.aspx</link><pubDate>Fri, 13 Nov 2009 19:06:48 GMT</pubDate><guid isPermaLink="false">4aa5dbf6-357b-46b2-b5b2-1b660a6dc370:251077</guid><dc:creator>Deej</dc:creator><slash:comments>2</slash:comments><comments>http://forums.xna.com/forums/thread/251077.aspx</comments><wfw:commentRss>http://forums.xna.com/forums/commentrss.aspx?SectionID=56&amp;PostID=251077</wfw:commentRss><description>Hi All,&lt;br /&gt;
&lt;br /&gt;
&lt;em&gt;Clover: A Curious Tale&lt;/em&gt; ideally need to support 800x600. Upon setting IsFullScreen to true, the framework decides it&amp;#39;d rather bump up the res from 800x600 to 1024x768.&lt;br /&gt;
&lt;br /&gt;
I&amp;#39;m guessing it&amp;#39;s doing this because it&amp;#39;s a closer match to the preferred back buffer dimensions of 1280x720.&lt;br /&gt;
&lt;br /&gt;
How can I be sure it &lt;em&gt;will&lt;/em&gt; work on 800x600? It&amp;#39;s taken me weeks to find anyone with a crappy old monitor that wasn&amp;#39;t widescreen, so I doubt I can find anyone who can lend me an archaic graphics card :)&lt;br /&gt;
&lt;br /&gt;
Hopefully one of the XNA team can shed some light on the ranking algorithm, if not I&amp;#39;m guessing I&amp;#39;ll need to rank display modes in a custom fashion just to be sure.&lt;br /&gt;
&lt;br /&gt;
Any ideas, peeps?&lt;br /&gt;</description></item><item><title>Will XNA 3.0 work with Visual Studio 2010 beta?</title><link>http://forums.xna.com/forums/thread/183682.aspx</link><pubDate>Fri, 29 May 2009 01:11:30 GMT</pubDate><guid isPermaLink="false">4aa5dbf6-357b-46b2-b5b2-1b660a6dc370:183682</guid><dc:creator>CHYEA BALLIN</dc:creator><slash:comments>9</slash:comments><comments>http://forums.xna.com/forums/thread/183682.aspx</comments><wfw:commentRss>http://forums.xna.com/forums/commentrss.aspx?SectionID=56&amp;PostID=183682</wfw:commentRss><description>I&amp;#39;ve heard that it&amp;#39;s possible to get XNA 3.0 Game Studio to work with Visual Studio 2010 beta. Somebody mentioned that the only thing that will not work, out of the box, is the content pipeline or something?&lt;br /&gt;
&lt;br /&gt;
Does anyone know if it&amp;#39;s possible to have XNA 3.0 working entirely with VS2010, and if not what&amp;#39;s the work-around? If there is one, anyways. I heard that there is, but this was just something I heard without investigating.
</description></item><item><title>Making a HUD class</title><link>http://forums.xna.com/forums/thread/252073.aspx</link><pubDate>Mon, 16 Nov 2009 20:03:28 GMT</pubDate><guid isPermaLink="false">4aa5dbf6-357b-46b2-b5b2-1b660a6dc370:252073</guid><dc:creator>tredge</dc:creator><slash:comments>6</slash:comments><comments>http://forums.xna.com/forums/thread/252073.aspx</comments><wfw:commentRss>http://forums.xna.com/forums/commentrss.aspx?SectionID=56&amp;PostID=252073</wfw:commentRss><description>I have created a class to count the coins collected by a sprite in my platform game.  I have created a CoinCollection class which is called from the main game.cs file:&lt;span style="font-size:13px;"&gt;
&lt;p&gt;coinCount = &lt;/p&gt;
&lt;/span&gt;
&lt;p&gt;&lt;span style="color:#0000ff;font-size:13px;"&gt;new&lt;/span&gt;&lt;span style="font-size:13px;"&gt; &lt;/span&gt;&lt;span style="color:#2b91af;font-size:13px;"&gt;CoinCollection&lt;/span&gt;&lt;span style="font-size:13px;"&gt;((Content.Load&amp;lt;&lt;/span&gt;&lt;span style="color:#2b91af;font-size:13px;"&gt;SpriteFont&lt;/span&gt;&lt;span style="font-size:13px;"&gt;&amp;gt;(&lt;/span&gt;&lt;span style="color:#a31515;font-size:13px;"&gt;&amp;quot;font&amp;quot;&lt;/span&gt;&lt;span style="font-size:13px;"&gt;)), &lt;/span&gt;&lt;span style="color:#0000ff;font-size:13px;"&gt;new&lt;/span&gt;&lt;span style="font-size:13px;"&gt; &lt;/span&gt;&lt;span style="color:#2b91af;font-size:13px;"&gt;Vector2&lt;/span&gt;&lt;span style="font-size:13px;"&gt;(&lt;/span&gt;&lt;span style="font-size:13px;"&gt;0,0), Coin.SourceRect, player.SourceRect);&lt;br /&gt;
&lt;br /&gt;
In the update method I call: &lt;span style="font-size:13px;"&gt;coinCount.checkForCollision();&lt;br /&gt;
&lt;br /&gt;
Then I draw it using:&lt;br /&gt;
&lt;span style="font-size:13px;"&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;spriteBatch.DrawString(coinCount.Font,&lt;/p&gt;
&lt;/span&gt;
&lt;p&gt;&lt;span style="font-size:13px;"&gt; coinCount.scoreLabel, coinScorePos, &lt;/span&gt;&lt;span style="color:#2b91af;font-size:13px;"&gt;Color&lt;/span&gt;&lt;span style="font-size:13px;"&gt;.Red);&lt;br /&gt;
&lt;br /&gt;
Using the source rectangle around my coin and my sprite, I wrote the following:&lt;br /&gt;
&lt;span style="color:#0000ff;font-size:13px;"&gt;&lt;span style="color:#0000ff;font-size:13px;"&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;public&lt;/p&gt;
&lt;/span&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;/span&gt;
&lt;p&gt;&lt;span style="color:#000000;font-size:13px;"&gt; &lt;/span&gt;&lt;span style="color:#0000ff;font-size:13px;"&gt;void&lt;/span&gt;&lt;span style="font-size:13px;"&gt;&lt;span style="color:#000000;"&gt; checkForCollision()&lt;/span&gt;{
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color:#0000ff;font-size:13px;"&gt;if&lt;/span&gt;&lt;span style="font-size:13px;"&gt; (playerRect.Intersects(coinRect))
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;{&lt;/p&gt;
&lt;p&gt;score += 1;&lt;/p&gt;
&lt;p&gt;displayScore = score.ToString();&lt;/p&gt;
&lt;p&gt;displayScoreTotal += displayScore;&lt;/p&gt;
&lt;p&gt;}}&lt;br /&gt;
&lt;br /&gt;
Anyone have any idea why it isn&amp;#39;t displaying on screen?  displayScoreTotal is initialised to &amp;quot;Coins &amp;quot; and this is all that shows up on screen&lt;br /&gt;
&lt;br /&gt;
Thanks&lt;/p&gt;
&lt;/span&gt;&lt;/p&gt;
&lt;/span&gt;&lt;/p&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;</description></item><item><title>Whats the best way to resize textures?</title><link>http://forums.xna.com/forums/thread/228697.aspx</link><pubDate>Mon, 21 Sep 2009 09:35:30 GMT</pubDate><guid isPermaLink="false">4aa5dbf6-357b-46b2-b5b2-1b660a6dc370:228697</guid><dc:creator>SevenOfEleven</dc:creator><slash:comments>10</slash:comments><comments>http://forums.xna.com/forums/thread/228697.aspx</comments><wfw:commentRss>http://forums.xna.com/forums/commentrss.aspx?SectionID=56&amp;PostID=228697</wfw:commentRss><description>I have a problem resizing textures.&lt;br /&gt;
&lt;br /&gt;
Have a mission screen with a 15 frame animation that plays when you enter the screen and a 17 frame animation when you leave it.&lt;br /&gt;
The plane loadout screen has the same animations but it does not resize. I don&amp;#39;t get any error on that screen so I know its the resize. &lt;br /&gt;
&lt;br /&gt;
When you run the game, there are no errors generated by the 2 screens but if you go back to the screen before the mission select screen and go through again, then I get an error.&lt;br /&gt;
&lt;br /&gt;
Error message:&lt;br /&gt;
&amp;lt;&lt;br /&gt;
StartRendering : All active render targets must be the same size with the same multisample type.&lt;br /&gt;
Source: Void VerifyDepthRenderTargetCompat()&lt;br /&gt;
Stack trace:&amp;nbsp;&amp;nbsp;&amp;nbsp; at Microsoft.Xna.Framework.Graphics.GraphicsDevice.VerifyDepthRenderTargetCompat()&lt;br /&gt;
&amp;nbsp;&amp;nbsp; at Microsoft.Xna.Framework.Graphics.GraphicsDevice.Clear(ClearOptions options, Color color, Single depth, Int32 stencil, Rectangle[] regions)&lt;br /&gt;
&amp;nbsp;&amp;nbsp; at Microsoft.Xna.Framework.Graphics.GraphicsDevice.Clear(Color color)&lt;br /&gt;
&amp;nbsp;&amp;nbsp; at ChaseCameraSample.ChaseCameraGame.StartRendering() in G:\Business\GameCo\Dev\PrizeFlyerCanyons1\ChaseCamera\Game.cs:line 749&lt;br /&gt;
&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The code:&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;public Texture2D resizeTexture(Texture2D sourceTexture, int newWidth,int newHeight)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Texture2D resultTexture;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; GraphicsDevice graphicsDevice;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; RenderTarget2D renderTarget;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Rectangle destinationRectangle;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; graphicsDevice = graphics.GraphicsDevice;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; renderTarget = new RenderTarget2D(graphicsDevice,&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; newWidth, newHeight, &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1,&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; graphics.GraphicsDevice.PresentationParameters.BackBufferFormat);//SurfaceFormat.Color&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; destinationRectangle = new Rectangle(0, 0, newWidth, newHeight);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; graphicsDevice.SetRenderTarget(0, renderTarget);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; spriteBatchl.Begin();&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; spriteBatchl.Draw(sourceTexture, destinationRectangle, Color.White);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; spriteBatchl.End();&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; graphicsDevice.SetRenderTarget(0, null);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; resultTexture = renderTarget.GetTexture();&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return (resultTexture);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
How can I fix this problem?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</description></item><item><title>foreach loops and Lists</title><link>http://forums.xna.com/forums/thread/252390.aspx</link><pubDate>Tue, 17 Nov 2009 16:26:10 GMT</pubDate><guid isPermaLink="false">4aa5dbf6-357b-46b2-b5b2-1b660a6dc370:252390</guid><dc:creator>Caomgen</dc:creator><slash:comments>11</slash:comments><comments>http://forums.xna.com/forums/thread/252390.aspx</comments><wfw:commentRss>http://forums.xna.com/forums/commentrss.aspx?SectionID=56&amp;PostID=252390</wfw:commentRss><description>I&amp;#39;m getting a strange error whenever I run my program.&lt;br /&gt;
&lt;br /&gt;
I create a list of custom objects at runtime, and there are several foreach loops running through these lists. There are certain conditions that remove objects from the lists, though.&lt;br /&gt;
&lt;br /&gt;
Whenever I would remove the object in question from the list, I&amp;#39;d get dropped out to the debug screen at my foreach loop with the error message, &amp;quot;Collection was modified; enumeration operation may not execute&amp;quot;, and it&amp;#39;s highlighting the &amp;quot;in&amp;quot; in my foreach (Object object in objects) line.&lt;br /&gt;
&lt;br /&gt;
It&amp;#39;s been causing me quite a headache, can anyone offer any suggestions?&lt;br /&gt;</description></item><item><title>Gamer Services Not Available</title><link>http://forums.xna.com/forums/thread/251980.aspx</link><pubDate>Mon, 16 Nov 2009 15:42:23 GMT</pubDate><guid isPermaLink="false">4aa5dbf6-357b-46b2-b5b2-1b660a6dc370:251980</guid><dc:creator>RobbosToYou</dc:creator><slash:comments>8</slash:comments><comments>http://forums.xna.com/forums/thread/251980.aspx</comments><wfw:commentRss>http://forums.xna.com/forums/commentrss.aspx?SectionID=56&amp;PostID=251980</wfw:commentRss><description>Hi all,&lt;br /&gt;
&lt;br /&gt;
I couldn&amp;#39;t find the answer to my question anywhere so here goes:&lt;br /&gt;
&lt;br /&gt;
I want to use the GamerServices if it&amp;#39;s available. On my development pc, this all goes well. On other pc&amp;#39;s however, it might break. Also, when trying to run multiple instances of the game at once,&lt;br /&gt;
it crashes.&lt;br /&gt;
&lt;br /&gt;
The problem is, I get a GamerServicesNotAvailableException and I don&amp;#39;t know how to handle it, so that the game can continue.&lt;br /&gt;
I add my gamer services component in the game&amp;#39;s constructor and keep it as a datamember in the game class.&lt;br /&gt;
If my game&amp;#39;s base.Initialize() method throws the exception, I catch it and remove the services from Components.&lt;br /&gt;
&lt;br /&gt;
The problem is if I catch it, my base.Initialize will never have fully completed and it&amp;#39;ll still crash because of that.&lt;br /&gt;
I don&amp;#39;t just want to throw out all GamerServices just because the redistributable version does not support it.&lt;br /&gt;
Instead I want to learn how to handle this exception and either use, or not use the GamerServices depending on its availability.&lt;br /&gt;
&lt;br /&gt;
This wasn&amp;#39;t very helpful: http://msdn.microsoft.com/en-us/library/bb975583%28XNAGameStudio.30%29.aspx&lt;br /&gt;
&lt;br /&gt;
Does anyone have an idea of how to handle this?&lt;br /&gt;</description></item><item><title>I want to display the ping time in milliseconds on my screen for debugging</title><link>http://forums.xna.com/forums/thread/252844.aspx</link><pubDate>Wed, 18 Nov 2009 22:14:27 GMT</pubDate><guid isPermaLink="false">4aa5dbf6-357b-46b2-b5b2-1b660a6dc370:252844</guid><dc:creator>RickyWh</dc:creator><slash:comments>3</slash:comments><comments>http://forums.xna.com/forums/thread/252844.aspx</comments><wfw:commentRss>http://forums.xna.com/forums/commentrss.aspx?SectionID=56&amp;PostID=252844</wfw:commentRss><description>I&amp;#39;m using a custom NetworkHelper class from a book that I&amp;#39;m reading and so far I&amp;#39;ve created a couple methods, one for creating sessions and one for finding and joining available sessions. I wired up the NetworkSession events so that messages are displayed on the screen when users enter and exit the session, tested it and it works. I want to also output the ping time in the upper left hand corner of the screen but am not sure about how to go about this, please help&lt;br /&gt;
&lt;br /&gt;
the AvailableNetworkSession object has a QualityOfService property that has a AverageRoundTripTime but this doesn&amp;#39;t appear to be what i&amp;#39;m looking for. Does XNA offer out something that&amp;#39;s already available in these networking classes that I can use?&lt;br /&gt;
&lt;br /&gt;</description></item><item><title>Combining a Skydome with sparkling stars </title><link>http://forums.xna.com/forums/thread/251686.aspx</link><pubDate>Sun, 15 Nov 2009 18:10:39 GMT</pubDate><guid isPermaLink="false">4aa5dbf6-357b-46b2-b5b2-1b660a6dc370:251686</guid><dc:creator>Fjotsee</dc:creator><slash:comments>3</slash:comments><comments>http://forums.xna.com/forums/thread/251686.aspx</comments><wfw:commentRss>http://forums.xna.com/forums/commentrss.aspx?SectionID=56&amp;PostID=251686</wfw:commentRss><description>Hey there&lt;br /&gt;
&lt;br /&gt;
I am trying to combine the a simple SkyDome (a sphere model with a single texture applied) with the sparkling stars demo from ziggy&amp;#39;s site, the link is here: &lt;a href="http://www.ziggyware.com/readarticle.php?article_id=250"&gt;&lt;br /&gt;
http://www.ziggyware.com/readarticle.php?article_id=250&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
However i would recommend NOT CLICKING THE LINK since you&amp;#39;ll be redirected to some other site, it seems that ziggyware is under some kind of attack currently.&lt;br /&gt;
&lt;br /&gt;
The Stars are created using an effect file and PointSprites&lt;br /&gt;
&lt;br /&gt;
Heres the drawing code for the stars:&lt;br /&gt;
&lt;br /&gt;
&lt;div style="border:#7f9db9 1px solid;background-color:white;font-family:courier new;font-size:11px;overflow:auto;"&gt;
&lt;table style="border-bottom:#eee 0px solid;border-right-width:0px;background-color:#fff;margin:2px 0px;width:99%;border-collapse:collapse;border-top-width:0px;border-left-width:0px;" cellspacing="0" cellpadding="0"&gt;
    
    
        &lt;tr&gt;
            &lt;td&gt;&lt;span style="font-size:11px;"&gt; spritesEffect.CurrentTechnique = spritesEffect.Techniques[&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;quot;StarSparkle&amp;quot;&lt;/span&gt;&lt;span style="font-size:11px;"&gt;];  &lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td style="background-color:#f7f7f7;"&gt; &lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td&gt;            Matrix infiniteView = View;  &lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td style="background-color:#f7f7f7;"&gt;            infiniteView.Translation = Vector3.Zero;  &lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td&gt;            spritesEffect.Parameters[&lt;span style="color:blue;"&gt;&amp;quot;sparkleValue&amp;quot;&lt;/span&gt;&lt;span style="font-size:11px;"&gt;].SetValue(currentSparkle);  &lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td style="background-color:#f7f7f7;"&gt;            spritesEffect.Parameters[&lt;span style="color:blue;"&gt;&amp;quot;View&amp;quot;&lt;/span&gt;&lt;span style="font-size:11px;"&gt;].SetValue(infiniteView);  &lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td&gt;            spritesEffect.Parameters[&lt;span style="color:blue;"&gt;&amp;quot;Projection&amp;quot;&lt;/span&gt;&lt;span style="font-size:11px;"&gt;].SetValue(Projection);  &lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td style="background-color:#f7f7f7;"&gt; &lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td&gt;            GraphicsDevice.RenderState.PointSpriteEnable = &lt;span style="color:blue;"&gt;true&lt;/span&gt;&lt;span style="font-size:11px;"&gt;;  &lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td style="background-color:#f7f7f7;"&gt;            GraphicsDevice.RenderState.DepthBufferEnable = &lt;span style="color:blue;"&gt;false&lt;/span&gt;&lt;span style="font-size:11px;"&gt;;  &lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td&gt;            GraphicsDevice.RenderState.AlphaBlendEnable = &lt;span style="color:blue;"&gt;true&lt;/span&gt;&lt;span style="font-size:11px;"&gt;;  &lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td style="background-color:#f7f7f7;"&gt;            GraphicsDevice.RenderState.SourceBlend = Blend.SourceAlpha;  &lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td&gt;            GraphicsDevice.RenderState.DestinationBlend = Blend.InverseSourceAlpha;  &lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td style="background-color:#f7f7f7;"&gt; &lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td&gt;            spritesEffect.Begin();  &lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td style="background-color:#f7f7f7;"&gt;            &lt;span style="color:blue;"&gt;foreach&lt;/span&gt;&lt;span style="font-size:11px;"&gt; (EffectPass pass &lt;/span&gt;&lt;span style="color:blue;"&gt;in&lt;/span&gt;&lt;span style="font-size:11px;"&gt; spritesEffect.CurrentTechnique.Passes)  &lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td&gt;            {  &lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td style="background-color:#f7f7f7;"&gt;                pass.Begin();  &lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td&gt;                GraphicsDevice.VertexDeclaration = starSpriteVertexDeclaration;  &lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td style="background-color:#f7f7f7;"&gt;                GraphicsDevice.DrawUserPrimitives(PrimitiveType.PointList, starArray, 0, starArray.Length);  &lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td&gt;                pass.End();  &lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td style="background-color:#f7f7f7;"&gt;            }  &lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td&gt;            spritesEffect.End();  &lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td style="background-color:#f7f7f7;"&gt; &lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td&gt;            GraphicsDevice.RenderState.DepthBufferEnable = &lt;span style="color:blue;"&gt;true&lt;/span&gt;&lt;span style="font-size:11px;"&gt;; &lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
    
&lt;/table&gt;
&lt;/div&gt;
&lt;br /&gt;
The SkyDome itself also dis- and reenables DepthBufferEnable before and after its ModelMesh.Draw() and applies the texture using the BasicEffect.Texture property. Other than that nothing special is set.&lt;br /&gt;
&lt;br /&gt;
Using either one works (though the sphere is not correctly rotated), but together, depending one draw order, one cancels out the other.&lt;br /&gt;
&lt;br /&gt;
Here is the game Draw code, that calls both...&lt;br /&gt;
&lt;br /&gt;
&lt;div style="border:#7f9db9 1px solid;background-color:white;font-family:courier new;font-size:11px;overflow:auto;"&gt;
&lt;table style="border-bottom:#eee 0px solid;border-right-width:0px;background-color:#fff;margin:2px 0px;width:99%;border-collapse:collapse;border-top-width:0px;border-left-width:0px;" cellspacing="0" cellpadding="0"&gt;
    
    
        &lt;tr&gt;
            &lt;td&gt;&lt;span style="font-size:11px;"&gt;&lt;/span&gt;&lt;span style="color:green;"&gt;//GraphicsDevice.Clear(ClearOptions.DepthBuffer, Color.White, 1.0f, 255); &lt;/span&gt;&lt;span style="font-size:11px;"&gt; &lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td style="background-color:#f7f7f7;"&gt;GraphicsDevice.Clear(Color.Black);  &lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td&gt; &lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td style="background-color:#f7f7f7;"&gt;_sky.Draw(gameTime);  &lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td&gt; &lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td style="background-color:#f7f7f7;"&gt;&lt;span style="color:green;"&gt;&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td&gt;_stars.Draw(gameTime);  &lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td style="background-color:#f7f7f7;"&gt;              &lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td&gt;&lt;span style="color:blue;"&gt;base&lt;/span&gt;&lt;span style="font-size:11px;"&gt;.Draw(gameTime); &lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
    
&lt;/table&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
Optimally i want to draw the stars in front of the sphere, add a bottom layer and draw that in front of the stars...&lt;br /&gt;
&lt;br /&gt;
Suggestions?&lt;br /&gt;
&lt;br /&gt;</description></item><item><title>Re-Sizing Window Not BackBuffer</title><link>http://forums.xna.com/forums/thread/36993.aspx</link><pubDate>Fri, 14 Dec 2007 08:02:44 GMT</pubDate><guid isPermaLink="false">4aa5dbf6-357b-46b2-b5b2-1b660a6dc370:36993</guid><dc:creator>Cairo</dc:creator><slash:comments>11</slash:comments><comments>http://forums.xna.com/forums/thread/36993.aspx</comments><wfw:commentRss>http://forums.xna.com/forums/commentrss.aspx?SectionID=56&amp;PostID=36993</wfw:commentRss><description>&lt;font face="Arial"&gt;Hi, I would like to resize my XNA Game window without modifying the backbuffer size, so the screen is just more streched.&lt;br&gt;&lt;br&gt;How would I do this?&lt;br&gt;&lt;br&gt;Thanks&lt;/font&gt;&lt;br&gt;</description></item></channel></rss>