<?xml version="1.0"?>
<rss version="2.0">
<channel>
<title>Xna Goodies</title>
<link>http://xna.tiddlyspot.com//</link>
<description>tips and notes for the Xna Framework.</description>
<language>en-us</language>
<copyright>Copyright 2007 Leaf</copyright>
<pubDate>Wed, 14 Feb 2007 20:19:12 UTC</pubDate>
<lastBuildDate>Wed, 14 Feb 2007 20:19:12 UTC</lastBuildDate>
<docs>http://blogs.law.harvard.edu/tech/rss</docs>
<generator>TiddlyWiki 2.0.11</generator>
<item>
<title>UploadLog</title>
<description>| !date | !user | !location | !storeUrl | !uploadDir | !toFilename | !backupdir | !origin |&lt;br /&gt;| 2/9/2006 14:50:19 | Leaf | [[/|http://xna.tiddlyspot.com/]] | [[store.cgi|http://xna.tiddlyspot.com/store.cgi]] | . | index.html | . | Ok |&lt;br /&gt;| 2/9/2006 14:58:47 | Leaf | [[/|http://xna.tiddlyspot.com/]] | [[store.cgi|http://xna.tiddlyspot.com/store.cgi]] | . | index.html | . |&lt;br /&gt;| 2/9/2006 15:10:6 | Leaf | [[/|http://xna.tiddlyspot.com/]] | [[store.cgi|http://xna.tiddlyspot.com/store.cgi]] | . | index.html | . |&lt;br /&gt;| 2/9/2006 15:45:22 | Leaf | [[/|http://xna.tiddlyspot.com/]] | [[store.cgi|http://xna.tiddlyspot.com/store.cgi]] | . | index.html | . |&lt;br /&gt;| 2/9/2006 15:49:47 | Leaf | [[/|http://xna.tiddlyspot.com/]] | [[store.cgi|http://xna.tiddlyspot.com/store.cgi]] | . | index.html | . | Ok |&lt;br /&gt;| 2/9/2006 23:3:4 | Leaf | [[/|http://xna.tiddlyspot.com/]] | [[store.cgi|http://xna.tiddlyspot.com/store.cgi]] | . | index.html | . |&lt;br /&gt;| 2/9/2006 23:8:52 | Leaf | [[/|http://xna.tiddlyspot.com/]] | [[store.cgi|http://xna.tiddlyspot.com/store.cgi]] | . | index.html | . |&lt;br /&gt;| 2/9/2006 23:14:44 | Leaf | [[/|http://xna.tiddlyspot.com/]] | [[store.cgi|http://xna.tiddlyspot.com/store.cgi]] | . | index.html | . |&lt;br /&gt;| 2/9/2006 23:17:25 | Leaf | [[/|http://xna.tiddlyspot.com/]] | [[store.cgi|http://xna.tiddlyspot.com/store.cgi]] | . | index.html | . |&lt;br /&gt;| 2/9/2006 23:24:32 | Leaf | [[/|http://xna.tiddlyspot.com/]] | [[store.cgi|http://xna.tiddlyspot.com/store.cgi]] | . | index.html | . |&lt;br /&gt;| 2/9/2006 23:30:54 | Leaf | [[/|http://xna.tiddlyspot.com/]] | [[store.cgi|http://xna.tiddlyspot.com/store.cgi]] | . | index.html | . |&lt;br /&gt;| 22/9/2006 10:3:19 | Leaf | [[/|http://xna.tiddlyspot.com/#%5B%5BUsing%20the%20gamepad%20thumbsticks%20data%5D%5D]] | [[store.cgi|http://xna.tiddlyspot.com/store.cgi]] | . | index.html | . |&lt;br /&gt;| 22/9/2006 10:16:32 | Leaf | [[/|http://xna.tiddlyspot.com/#%5B%5BUsing%20the%20gamepad%20thumbsticks%20data%5D%5D]] | [[store.cgi|http://xna.tiddlyspot.com/store.cgi]] | . | index.html | . |&lt;br /&gt;| 22/9/2006 14:43:6 | Leaf | [[/|http://xna.tiddlyspot.com/]] | [[store.cgi|http://xna.tiddlyspot.com/store.cgi]] | . | index.html | . | Ok |&lt;br /&gt;| 22/9/2006 14:44:14 | Leaf | [[/|http://xna.tiddlyspot.com/]] | [[store.cgi|http://xna.tiddlyspot.com/store.cgi]] | . | index.html | . | Ok |&lt;br /&gt;| 22/9/2006 15:2:15 | Leaf | [[/|http://xna.tiddlyspot.com/]] | [[store.cgi|http://xna.tiddlyspot.com/store.cgi]] | . | index.html | . |&lt;br /&gt;| 23/9/2006 12:8:35 | Leaf | [[/|http://xna.tiddlyspot.com/]] | [[store.cgi|http://xna.tiddlyspot.com/store.cgi]] | . | index.html | . |&lt;br /&gt;| 2/10/2006 17:20:9 | Leaf | [[/|http://xna.tiddlyspot.com/]] | [[store.cgi|http://xna.tiddlyspot.com/store.cgi]] | . | index.html | . | Ok |&lt;br /&gt;| 2/10/2006 17:23:34 | Leaf | [[/|http://xna.tiddlyspot.com/]] | [[store.cgi|http://xna.tiddlyspot.com/store.cgi]] | . | index.html | . |&lt;br /&gt;| 2/10/2006 17:44:15 | Leaf | [[/|http://xna.tiddlyspot.com/]] | [[store.cgi|http://xna.tiddlyspot.com/store.cgi]] | . | index.html | . |&lt;br /&gt;| 2/10/2006 18:26:55 | Leaf | [[/|http://xna.tiddlyspot.com/]] | [[store.cgi|http://xna.tiddlyspot.com/store.cgi]] | . | index.html | . |&lt;br /&gt;| 22/11/2006 11:23:7 | YourName | [[/|http://xna.tiddlyspot.com/]] | [[store.cgi|http://xna.tiddlyspot.com/store.cgi]] | . | index.html | . |&lt;br /&gt;| 22/11/2006 11:24:18 | YourName | [[/|http://xna.tiddlyspot.com/]] | [[store.cgi|http://xna.tiddlyspot.com/store.cgi]] | . | index.html | . |&lt;br /&gt;| 22/11/2006 11:29:58 | YourName | [[/|http://xna.tiddlyspot.com/]] | [[store.cgi|http://xna.tiddlyspot.com/store.cgi]] | . | index.html | . |&lt;br /&gt;| 20/12/2006 11:50:20 | YourName | [[/|http://xna.tiddlyspot.com/]] | [[store.cgi|http://xna.tiddlyspot.com/store.cgi]] | . | index.html | . |&lt;br /&gt;| 20/12/2006 19:9:18 | YourName | [[/|http://xna.tiddlyspot.com/]] | [[store.cgi|http://xna.tiddlyspot.com/store.cgi]] | . | index.html | . |&lt;br /&gt;| 20/12/2006 19:10:25 | YourName | [[/|http://xna.tiddlyspot.com/]] | [[store.cgi|http://xna.tiddlyspot.com/store.cgi]] | . | index.html | . |&lt;br /&gt;| 22/12/2006 7:40:42 | YourName | [[/|http://xna.tiddlyspot.com/#Hello%20%5B%5BBuilding%20for%20Xbox%20360%20and%20Windows%20with%20one%20project%5D%5D]] | [[store.cgi|http://xna.tiddlyspot.com/store.cgi]] | . | index.html | . | Ok |&lt;br /&gt;| 22/12/2006 7:54:6 | YourName | [[/|http://xna.tiddlyspot.com/#Hello%20%5B%5BBuilding%20for%20Xbox%20360%20and%20Windows%20with%20one%20project%5D%5D]] | [[store.cgi|http://xna.tiddlyspot.com/store.cgi]] | . | index.html | . |&lt;br /&gt;| 30/12/2006 12:3:16 | YourName | [[/|http://xna.tiddlyspot.com/]] | [[store.cgi|http://xna.tiddlyspot.com/store.cgi]] | . | index.html | . |&lt;br /&gt;| 30/12/2006 12:4:23 | Leaf | [[/|http://xna.tiddlyspot.com/]] | [[store.cgi|http://xna.tiddlyspot.com/store.cgi]] | . | index.html | . |&lt;br /&gt;| 2/1/2007 0:6:0 | Leaf | [[/|http://xna.tiddlyspot.com/]] | [[store.cgi|http://xna.tiddlyspot.com/store.cgi]] | . | index.html | . |&lt;br /&gt;| 2/1/2007 0:6:10 | Leaf | [[/|http://xna.tiddlyspot.com/]] | [[store.cgi|http://xna.tiddlyspot.com/store.cgi]] | . | index.html | . |&lt;br /&gt;| 8/1/2007 11:24:36 | YourName | [[/|http://xna.tiddlyspot.com/]] | [[store.cgi|http://xna.tiddlyspot.com/store.cgi]] | . | index.html | . |&lt;br /&gt;| 8/1/2007 14:52:4 | Leaf | [[/|http://xna.tiddlyspot.com/]] | [[store.cgi|http://xna.tiddlyspot.com/store.cgi]] | . | index.html | . |&lt;br /&gt;| 12/1/2007 9:49:2 | YourName | [[/|http://xna.tiddlyspot.com/]] | [[store.cgi|http://xna.tiddlyspot.com/store.cgi]] | . | index.html | . |&lt;br /&gt;| 14/2/2007 20:19:12 | Leaf | [[/|http://xna.tiddlyspot.com/#[[Viewing DirectX Debug Output]]]] | [[store.cgi|http://xna.tiddlyspot.com/store.cgi]] | . | index.html | . |</description>
<link>http://xna.tiddlyspot.com//#UploadLog</link>
<pubDate>Wed, 14 Feb 2007 20:19:12 UTC</pubDate>
</item>
<item>
<title>StephStyrchakRespondsOnDualPlatforms</title>
<description>Stephen Styrchak from Microsoft posted on the [[XNA forums|http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1045802&amp;SiteID=1&amp;PageID=2]] with more information about enabling projects to work with both platforms.&lt;br /&gt;&lt;br /&gt;&lt;&lt;&lt;&lt;br /&gt;Intellisense should resolve correctly if you've set up the project properly.&lt;br /&gt;&lt;br /&gt;The reason it's so easy to enable this is because we had intended originally to support this scenario. However, the cross-platform project feature had to be cut to meet our schedule. Although a lot of the main scenarios work pretty well and are easy to &quot;turn on&quot;, we didn't have anyone testing them and we stopped working on it before there were any checks in place to help keep you out of the bear traps. Trust me when I say that it's no accident that you can change a bit of XML and all of a sudden this feature comes out of nowhere. It's also no accident that we didn't include it in our templates by default.&lt;br /&gt;&lt;br /&gt;I had planned to blog about how to enable it, and how to avoid the common pitfalls, so at least advanced users would be able to take advantage of the scenario. Unfortunately, other members of the team felt that we had to maintain a consistent message that it is &quot;not supported.&quot; At this point, I think that it would have been better to be more forthcoming.&lt;br /&gt;&lt;br /&gt;Anyway, yes, there are things that don't work well when you create a project with both Xbox 360 and x86 platform configurations. You have to expect that, since we didn't finish the feature and it is officially unsupported for that very reason.&lt;br /&gt;&lt;br /&gt;If you want to see the references updated in the Properties Window, just press the Refresh toolbar button in the Solution Explorer. The references are automatically re-resolved for intellisense, but the Properties Window needs a bit of help. This is something we can make automatic in the future, along with refreshing the Project properties (you may note the XNA Framework Platform property doesn't appear to update when you switch platforms -- it is actually just the Properties Window not displaying the new value).&lt;br /&gt;&lt;br /&gt;What about platform-specific references? Well, that is something you can do manually in your csproj file if you know enough about msbuild. However, the IDE won't understand it and will not display those references correctly. This is something that we may fix in a future version, but requires some cooperation from the VS team who have other priorities.&lt;br /&gt;&lt;br /&gt;There are other features in the IDE that can be completely hosed by switching platforms in the IDE. Most designers and single-file generators (custom tools) are incompatible with the Xbox 360 platform, for example. We turned off most access points to these when Xbox 360 is the active platform, but with a cross-platform project you can easily open a Winforms editor (or component editor, or dataset designer, or whatever) in the x86 configuration and then switch to the Xbox 360 configuration. At that point, it's almost a guarantee that something in the editor will malfunction. Obviously, most people do not want to edit windows forms in their XNA projects, but some people still try it and we don't want to corrupt their files when they make that mistake. At the very least, we'd like to make it harder to make that kind of mistake.&lt;br /&gt;&lt;br /&gt;Referencing assemblies from the wrong platform can cause problems that are really hard to diagnose and debug. Those problems generally only show up at runtime, which could be long after the reference was added. That makes it harder for inexperienced programmers to determine cause and effect. With a cross-platform project, it's really easy to add a reference to an assembly meant for the other platform. We can make it easier to detect when that kind of mistake is made, but we couldn't for v1. Since we have to take into consideration that many of our users are going to be new to programming, we decided against enabling a feature by default that requires experience to use correctly.&lt;br /&gt;&lt;br /&gt;Please vote on this subject in Connect if you want to see it fully supported in future versions. Features that are requested by direct customer feedback tend to get more notice than just me sitting in the corner saying we should do it. :-)&lt;br /&gt;&lt;&lt;&lt;</description>
<link>http://xna.tiddlyspot.com//#StephStyrchakRespondsOnDualPlatforms</link>
<pubDate>Fri, 12 Jan 2007 09:48:00 UTC</pubDate>
</item>
<item>
<title>Building for Xbox 360 and Windows with one project</title>
<description>I've created a Visual Studio project template to create projects that you can build for Xbox 360 or Windows, by selecting the appropriate platform in the Visual Studio IDE. Each configuration/platform combination has the usual definitions and build settings, so you can use {{{#if XBOX360}}} and so on to deal with platform differences. This solves some of the problems that people have had with having to keep two projects, one for each platform, synchronised. Now you only need one project.&lt;br /&gt;&lt;br /&gt;The XNA devs have said that they don't support this at the moment so you're on your own if you use it, we're finding it very useful though. @@Late change: Stephen Styrchak was kind enough to respond on the XNA forums and had some more information about this. I've taken the liberty of copying his post [[StephStyrchakRespondsOnDualPlatforms]].@@&lt;br /&gt;&lt;br /&gt;See the [[DualPlatform Download and Installation Instructions]] to get it.</description>
<category>Articles</category>
<link>http://xna.tiddlyspot.com//#%5B%5BBuilding%20for%20Xbox%20360%20and%20Windows%20with%20one%20project%5D%5D</link>
<pubDate>Fri, 12 Jan 2007 09:43:00 UTC</pubDate>
</item>
<item>
<title>Performance notes on the Effect System</title>
<description>The effects system is an optional abstraction of shaders and render state, you could ignore it and instead just use VertexShader, PixelShader and RenderState directly. Because of this its important to understand that setting the value of an EffectParameter is not the same as setting a ShaderConstant, the effect system will cache the value and then set the shader constant at a later point (usually on EffectPass.Begin() or EffectPass.CommitChanges()).&lt;br /&gt;&lt;br /&gt;Each instance of an Effect will cache its own parameter values. So if you have two Effect instances that are using the same .fx file they will each have a copy of the parameter values. This is good because you can store different values in different Effect instances. This is bad because each time you switch between using those instances to render something the effects system will have to upload the different value to the shader. This could affect how you sort your objects for rendering.&lt;br /&gt;&lt;br /&gt;You can share parameters over different .fx files by using the an EffectPool and marking your parameters as shared in the .fx file. Using this you could set global values such as view and projection matrices only once per frame.</description>
<category>InProgress</category>
<link>http://xna.tiddlyspot.com//#%5B%5BPerformance%20notes%20on%20the%20Effect%20System%5D%5D</link>
<pubDate>Mon, 8 Jan 2007 14:51:00 UTC</pubDate>
</item>
<item>
<title>DefaultTiddlers</title>
<description>[[Hello]] [[Some Notes on Using the MSBuild API]] [[Building for Xbox 360 and Windows with one project]] [[Avoiding extra texture processing in the Content Pipeline]] [[Taking Screen Shots]] [[Viewing DirectX Debug Output]] </description>
<link>http://xna.tiddlyspot.com//#DefaultTiddlers</link>
<pubDate>Mon, 8 Jan 2007 11:24:00 UTC</pubDate>
</item>
<item>
<title>Some Notes on Using the MSBuild API</title>
<description>@@This is taken from a post I made in the [[XNA Framework Forum|http://forums.microsoft.com/MSDN/showpost.aspx?postid=1039768&amp;siteid=1]]@@&lt;br /&gt;&lt;br /&gt;The MSBuild Api is part of the .Net Framework, check out theses namespaces:&lt;br /&gt;&lt;br /&gt;[[Microsoft.Build.Framework|http://msdn2.microsoft.com/en-us/library/microsoft.build.framework(VS.80).aspx]]&lt;br /&gt;[[Microsoft.Build.BuildEngine|http://msdn2.microsoft.com/en-us/library/microsoft.build.buildengine(VS.80).aspx]]&lt;br /&gt;&lt;br /&gt;The [[Engine|http://msdn2.microsoft.com/en-us/library/microsoft.build.buildengine.engine(VS.80).aspx]] class has a simple example of building a project file but unlike the sample you don't have to hard code the path to the .Net runtime, you can use {{{System.Runtime.InteropServices.RuntimeEnvironment.GetRuntimeDirectory()}}} instead.&lt;br /&gt;&lt;br /&gt;Here's an IronPython console sessions that shows how easy it can be (I use IronPython to check out .Net libs):&lt;br /&gt;{{{&lt;br /&gt;&gt;&gt;&gt; import System&lt;br /&gt;&gt;&gt;&gt; import clr&lt;br /&gt;&gt;&gt;&gt; clr.AddReference(&quot;Microsoft.Build.Engine&quot;)&lt;br /&gt;&gt;&gt;&gt; from Microsoft.Build.BuildEngine import *&lt;br /&gt;&gt;&gt;&gt; e = Engine()&lt;br /&gt;&gt;&gt;&gt; e.BinPath = System.Runtime.InteropServices.RuntimeEnvironment.GetRuntimeDirectory()&lt;br /&gt;&gt;&gt;&gt; log = ConsoleLogger()&lt;br /&gt;&gt;&gt;&gt; e.RegisterLogger(log)&lt;br /&gt;&gt;&gt;&gt; e.BuildProjectFile(&quot;buildmulti.proj&quot;)&lt;br /&gt;Build started 20/12/2006 07:14:13.&lt;br /&gt;__________________________________________________&lt;br /&gt;Project &quot;X:\msbuild\buildmulti.proj&quot; (default targets):&lt;br /&gt;&lt;br /&gt;Target XNAContentBuild:&lt;br /&gt; bin\Debug\cloudyhills.xnb is already up to date&lt;br /&gt;&lt;br /&gt;Build succeeded.&lt;br /&gt; 0 Warning(s)&lt;br /&gt; 0 Error(s)&lt;br /&gt;&lt;br /&gt;Time Elapsed 00:00:01.01&lt;br /&gt;True&lt;br /&gt;&gt;&gt;&gt;&lt;br /&gt;}}}&lt;br /&gt;&lt;br /&gt;I would also suggest that you read the [[MSBuild docs|http://msdn2.microsoft.com/en-us/library/wea2sca5.aspx]] and learn how build projects work - you could move a lot of logic into the project file itself to avoid you having to generate project files for every asset. For example if you decide on a directory layout for your level assets then you could have a single build project that builds any file in your textures directory using a texture processor and any file in your models directory using a model processor and so on.&lt;br /&gt;&lt;br /&gt;Once you have a system set up you have some very powerful options open to you; you could build from the level editor or provide shortcuts that just run the build without starting the level editor (for users that are just editing assets) or levels can be built from the command line on a network server, or check for changes to a source control system so that as soon as an artist checks in a change the level data is rebuilt and can then be shared between users. There are many options.</description>
<category>Articles</category>
<link>http://xna.tiddlyspot.com//#%5B%5BSome%20Notes%20on%20Using%20the%20MSBuild%20API%5D%5D</link>
<pubDate>Mon, 8 Jan 2007 11:23:00 UTC</pubDate>
</item>
<item>
<title>DualPlatform Download and Installation Instructions</title>
<description>|!Download |!Description |h&lt;br /&gt;|[[DualPlatformXnaGame.zip|http://www.tataput.com/external/downloads/DualPlatformXnaGame.zip]] |VS Project template for dual platform game|&lt;br /&gt;|[[DualPlatformXnaLibrary.zip|http://www.tataput.com/external/downloads/DualPlatformXnaLibrary.zip]] |VS Project template for dual platform library|&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Copy the zip into:&lt;br /&gt;{{{My Documents\Visual Studio 2005\Templates\ProjectTemplates\Visual C#\XNA}}}&lt;br /&gt;&lt;br /&gt;Then you should be able to see the template in your &quot;My Templates&quot; section when creating a new project.</description>
<link>http://xna.tiddlyspot.com//#%5B%5BDualPlatform%20Download%20and%20Installation%20Instructions%5D%5D</link>
<pubDate>Tue, 2 Jan 2007 00:05:00 UTC</pubDate>
</item>
<item>
<title>How to enable configurations in VSExpress</title>
<description>@@The release version of XNA automatically enables build configurations. So this is not needed.@@&lt;br /&gt;&lt;br /&gt;Visual Studio Express has simplified the IDE a little to make it easier for beginners. This can be a little irritating for those of us who have some experience with Visual Studio and are just using the Express version because of XNA. Fortunately you can enable some of those missing bits.&lt;br /&gt;&lt;br /&gt;To get the configuration stuff you need to:&lt;br /&gt;&lt;br /&gt;* Tools/Options&lt;br /&gt;* Select &quot;Show All Options&quot;&lt;br /&gt;* Select the &quot;Project and Solutions&quot; section&lt;br /&gt;* Enable &quot;Show Advanced Build Configurations&quot;&lt;br /&gt;&lt;br /&gt;Now you can select to build Debug or Release and also select the Platform.</description>
<category>Articles</category>
<link>http://xna.tiddlyspot.com//#%5B%5BHow%20to%20enable%20configurations%20in%20VSExpress%5D%5D</link>
<pubDate>Sat, 30 Dec 2006 12:02:00 UTC</pubDate>
</item>
<item>
<title>MainMenu</title>
<description>[[Articles]]</description>
<link>http://xna.tiddlyspot.com//#MainMenu</link>
<pubDate>Fri, 22 Dec 2006 07:40:00 UTC</pubDate>
</item>
<item>
<title>Hello</title>
<description>This is a place for me to put out the occasional article on the [[XNA Framework|http://msdn.microsoft.com/directx/XNA/default.aspx]].&lt;br /&gt;&lt;br /&gt;These words are on your screen courtesy of [[tiddlyspot|http://tiddlyspot.com]] and [[tiddlywiki|http://tiddlywiki.com]], many thanks to them.</description>
<category>News</category>
<link>http://xna.tiddlyspot.com//#Hello</link>
<pubDate>Fri, 22 Dec 2006 07:39:00 UTC</pubDate>
</item>
<item>
<title>Taking Screen Shots</title>
<description>@@Note: this has not been updated for beta2 or v1.0 yet. I'll get to it soon.@@&lt;br /&gt;&lt;br /&gt;This is a simple screen capture component, its one redeeming feature is that it should handle games that run with multisampling enabled. I'm still not convinced of the usefulness of GameComponents beyond very simple things but this case is very simple and I guess it makes the 'installation' of the code easier.&lt;br /&gt;&lt;br /&gt;To use it you need to either compile the source code into your project or install the control. Then you should be able to find the component in your designer tool box. Drag it into your game's design surface. Change the properties of the ScreenCapture component to set the capture key and file name.&lt;br /&gt;&lt;br /&gt;I've not tested this much but I did drop it into a couple of different Xna game projects, including Space War and was able to take screen shots with no trouble.&lt;br /&gt;&lt;br /&gt;See ScreenShotHowTo for more information on how to take screen shots when multisampling is enabled.&lt;br /&gt;See ScreenShotComponentDownload for the source code.&lt;br /&gt;&lt;br /&gt;</description>
<category>Articles</category>
<link>http://xna.tiddlyspot.com//#%5B%5BTaking%20Screen%20Shots%5D%5D</link>
<pubDate>Wed, 20 Dec 2006 11:30:00 UTC</pubDate>
</item>
<item>
<title>Avoiding extra texture processing in the Content Pipeline</title>
<description>If you've tried loading a 3D model into XNA with the Content Pipeline then you may have come across a problem with the textures. The problem is that, by default, textures referenced by 3D models are processed using the ModelTextureProcessor which does colour keying, mipmap generation and converts the textures to a DXT compressed format. While this default processing could be considered useful in some cases, many times its not what the you expect, also I commonly use DDS textures that are already in the correct runtime format with the correct amount of mipmaps (sometimes I want mipmaps sometimes not) so I don't need any extra processing from the content pipeline, I just need it to 'pass through' the DDS textures.&lt;br /&gt;&lt;br /&gt;I have created a new model, material and texture processor that will just pass through any DDS textures while doing the usual processing on any other texture file formats. Thanks to the Content Pipeline's flexible design these were very easy to write as I just had to derive from other processors and then override a method or two.&lt;br /&gt;&lt;br /&gt;See DDSPassThroughProcessorsSource for the source code, you'll need to look in the XNA docs to see how to add processors to the Content Pipeline. Once you have them installed in your project then you just use the {{{Model (DDS Passthrough)}}} processor for your models instead of the default one.</description>
<category>Articles</category>
<link>http://xna.tiddlyspot.com//#%5B%5BAvoiding%20extra%20texture%20processing%20in%20the%20Content%20Pipeline%5D%5D</link>
<pubDate>Wed, 22 Nov 2006 11:29:00 UTC</pubDate>
</item>
<item>
<title>DDSPassThroughProcessorsSource</title>
<description>{{{&lt;br /&gt;namespace BasicProcessors&lt;br /&gt;{&lt;br /&gt; [ContentProcessor(DisplayName = &quot;Model (DDS Passthrough)&quot;)]&lt;br /&gt; public class DdsModelProcessor : ModelProcessor&lt;br /&gt; {&lt;br /&gt; protected override MaterialContent ConvertMaterial(MaterialContent material, ContentProcessorContext context)&lt;br /&gt; {&lt;br /&gt; return context.Convert&lt;MaterialContent, MaterialContent&gt;(material, &quot;DdsMaterialProcessor&quot;);&lt;br /&gt; }&lt;br /&gt; } &lt;br /&gt;&lt;br /&gt; [ContentProcessor(DisplayName = &quot;Material (DDS Passthrough)&quot;)]&lt;br /&gt; public class DdsMaterialProcessor : MaterialProcessor&lt;br /&gt; {&lt;br /&gt; protected override ExternalReference&lt;TextureContent&gt; BuildTexture(&lt;br /&gt; string textureName, &lt;br /&gt; ExternalReference&lt;TextureContent&gt; texture, &lt;br /&gt; ContentProcessorContext context)&lt;br /&gt; {&lt;br /&gt; if (Path.GetExtension(texture.Filename) == &quot;.dds&quot;)&lt;br /&gt; {&lt;br /&gt; return context.BuildAsset&lt;TextureContent, TextureContent&gt;(texture, &quot;DdsTextureProcessor&quot;);&lt;br /&gt; }&lt;br /&gt; else&lt;br /&gt; {&lt;br /&gt; return context.BuildAsset&lt;TextureContent, TextureContent&gt;(texture, &quot;ModelTextureProcessor&quot;);&lt;br /&gt; }&lt;br /&gt; }&lt;br /&gt; }&lt;br /&gt;&lt;br /&gt; [ContentProcessor(DisplayName = &quot;Texture (DDS Passthrough)&quot;)]&lt;br /&gt; public class DdsTextureProcessor : ContentProcessor&lt;TextureContent, TextureContent&gt;&lt;br /&gt; {&lt;br /&gt; public override TextureContent Process(TextureContent input, ContentProcessorContext context)&lt;br /&gt; {&lt;br /&gt; return input;&lt;br /&gt; }&lt;br /&gt; }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;}}}</description>
<link>http://xna.tiddlyspot.com//#DDSPassThroughProcessorsSource</link>
<pubDate>Wed, 22 Nov 2006 11:22:00 UTC</pubDate>
</item>
<item>
<title>ScreenShotComponentDownload</title>
<description>|!Download |!Description |h&lt;br /&gt;|[[Source|http://www.tataput.com/external/downloads/ScreenCapture.cs]] |Single .cs source code file. |&lt;br /&gt;|[[VSI|http://www.tataput.com/external/downloads/BasicFramework.ScreenCapture.vsi]] |Visual Studio Content Installer file. This will automatically install the component into your VS Tool Box.|</description>
<link>http://xna.tiddlyspot.com//#ScreenShotComponentDownload</link>
<pubDate>Mon, 2 Oct 2006 16:20:00 UTC</pubDate>
</item>
<item>
<title>ScreenShotHowTo</title>
<description>When multisampling is enabled it is not possible to get at the screen buffer data. Instead you need to use GraphicsDevice::StretchRectangle() to downsample the mutlisampled render target to another non-multisampled render target.&lt;br /&gt;&lt;br /&gt;{{{&lt;br /&gt;public void DoCapture()&lt;br /&gt;{&lt;br /&gt; IGraphicsDeviceService gs = Game.GameServices.GetService&lt;IGraphicsDeviceService&gt;();&lt;br /&gt; GraphicsDevice device = gs.GraphicsDevice;&lt;br /&gt;&lt;br /&gt; using (Texture2D dstTexture = new Texture2D(&lt;br /&gt; device,&lt;br /&gt; device.Viewport.Width,&lt;br /&gt; device.Viewport.Height,&lt;br /&gt; 1,&lt;br /&gt; ResourceUsage.RenderTarget,&lt;br /&gt; SurfaceFormat.Color,&lt;br /&gt; ResourcePool.Default))&lt;br /&gt; {&lt;br /&gt; using (Surface dstSurface = dstTexture.GetSurfaceLevel(0))&lt;br /&gt; {&lt;br /&gt; using (Surface srcSurface = device.GetRenderTarget(0))&lt;br /&gt; {&lt;br /&gt; device.StretchRectangle(srcSurface, null, dstSurface, null, TextureFilter.None);&lt;br /&gt; }&lt;br /&gt; }&lt;br /&gt;&lt;br /&gt; dstTexture.Save(FixedName, FileFormat);&lt;br /&gt; }&lt;br /&gt;}&lt;br /&gt;}}}</description>
<link>http://xna.tiddlyspot.com//#ScreenShotHowTo</link>
<pubDate>Mon, 2 Oct 2006 15:10:00 UTC</pubDate>
</item>
<item>
<title>StyleSheetColors</title>
<description>/***&lt;br /&gt;!Colors Used&lt;br /&gt;*@@bgcolor(#8cf): #8cf - Background blue@@&lt;br /&gt;*@@bgcolor(#18f): #18f - Top blue@@&lt;br /&gt;*@@bgcolor(#04b): #04b - Mid blue@@&lt;br /&gt;*@@bgcolor(#014):color(#fff): #014 - Bottom blue@@&lt;br /&gt;*@@bgcolor(#ffc): #ffc - Bright yellow@@&lt;br /&gt;*@@bgcolor(#fe8): #fe8 - Highlight yellow@@&lt;br /&gt;*@@bgcolor(#db4): #db4 - Background yellow@@&lt;br /&gt;*@@bgcolor(#841): #841 - Border yellow@@&lt;br /&gt;*@@bgcolor(#703):color(#fff): #703 - Title red@@&lt;br /&gt;*@@bgcolor(#866): #866 - Subtitle grey@@&lt;br /&gt;!Generic Rules /%==============================================%/&lt;br /&gt;***/&lt;br /&gt;/*{{{*/&lt;br /&gt;body {&lt;br /&gt; background: #fff;&lt;br /&gt; color: #000;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;a{&lt;br /&gt; color: #04b;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;a:hover{&lt;br /&gt; background: #04b;&lt;br /&gt; color: #fff;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;a img{&lt;br /&gt; border: 0;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;h1,h2,h3,h4,h5 {&lt;br /&gt; color: #703;&lt;br /&gt; background: #8cf;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;.button {&lt;br /&gt; color: #014;&lt;br /&gt; border: 1px solid #fff;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;.button:hover {&lt;br /&gt; color: #014;&lt;br /&gt; background: #fe8;&lt;br /&gt; border-color: #db4;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;.button:active {&lt;br /&gt; color: #fff;&lt;br /&gt; background: #db4;&lt;br /&gt; border: 1px solid #841;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;/*}}}*/&lt;br /&gt;/***&lt;br /&gt;!Header /%==================================================%/&lt;br /&gt;***/&lt;br /&gt;/*{{{*/&lt;br /&gt;.header {&lt;br /&gt; background: #0b4;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;.headerShadow {&lt;br /&gt; color: #000;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;.headerShadow a {&lt;br /&gt; font-weight: normal;&lt;br /&gt; color: #000;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;.headerForeground {&lt;br /&gt; color: #fff;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;.headerForeground a {&lt;br /&gt; font-weight: normal;&lt;br /&gt; color: #fff;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;/*}}}*/&lt;br /&gt;/***&lt;br /&gt;!General tabs /%=================================================%/&lt;br /&gt;***/&lt;br /&gt;/*{{{*/&lt;br /&gt;&lt;br /&gt;.tabSelected{&lt;br /&gt; color: #014;&lt;br /&gt; background: #eee;&lt;br /&gt; border-left: 1px solid #ccc;&lt;br /&gt; border-top: 1px solid #ccc;&lt;br /&gt; border-right: 1px solid #ccc;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;.tabUnselected {&lt;br /&gt; color: #fff;&lt;br /&gt; background: #999;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;.tabContents {&lt;br /&gt; color: #014;&lt;br /&gt; background: #eee;&lt;br /&gt; border: 1px solid #ccc;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;.tabContents .button {&lt;br /&gt; border: 0;}&lt;br /&gt;&lt;br /&gt;/*}}}*/&lt;br /&gt;/***&lt;br /&gt;!Sidebar options /%=================================================%/&lt;br /&gt;~TiddlyLinks and buttons are treated identically in the sidebar and slider panel&lt;br /&gt;***/&lt;br /&gt;/*{{{*/&lt;br /&gt;#sidebar {&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;#sidebarOptions input {&lt;br /&gt; border: 1px solid #04b;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;#sidebarOptions .sliderPanel {&lt;br /&gt; background: #8cf;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;#sidebarOptions .sliderPanel a {&lt;br /&gt; border: none;&lt;br /&gt; color: #04b;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;#sidebarOptions .sliderPanel a:hover {&lt;br /&gt; color: #fff;&lt;br /&gt; background: #04b;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;#sidebarOptions .sliderPanel a:active {&lt;br /&gt; color: #04b;&lt;br /&gt; background: #fff;&lt;br /&gt;}&lt;br /&gt;/*}}}*/&lt;br /&gt;/***&lt;br /&gt;!Message Area /%=================================================%/&lt;br /&gt;***/&lt;br /&gt;/*{{{*/&lt;br /&gt;#messageArea {&lt;br /&gt; border: 1px solid #841;&lt;br /&gt; background: #db4;&lt;br /&gt; color: #014;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;#messageArea .button {&lt;br /&gt; padding: 0.2em 0.2em 0.2em 0.2em;&lt;br /&gt; color: #014;&lt;br /&gt; background: #fff;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;/*}}}*/&lt;br /&gt;/***&lt;br /&gt;!Popup /%=================================================%/&lt;br /&gt;***/&lt;br /&gt;/*{{{*/&lt;br /&gt;.popup {&lt;br /&gt; background: #18f;&lt;br /&gt; border: 1px solid #04b;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;.popup hr {&lt;br /&gt; color: #014;&lt;br /&gt; background: #014;&lt;br /&gt; border-bottom: 1px;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;.popup li.disabled {&lt;br /&gt; color: #04b;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;.popup li a, .popup li a:visited {&lt;br /&gt; color: #eee;&lt;br /&gt; border: none;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;.popup li a:hover {&lt;br /&gt; background: #014;&lt;br /&gt; color: #fff;&lt;br /&gt; border: none;&lt;br /&gt;}&lt;br /&gt;/*}}}*/&lt;br /&gt;/***&lt;br /&gt;!Tiddler Display /%=================================================%/&lt;br /&gt;***/&lt;br /&gt;/*{{{*/&lt;br /&gt;.tiddler .defaultCommand {&lt;br /&gt; font-weight: bold;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;.shadow .title {&lt;br /&gt; color: #866;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;.title {&lt;br /&gt; color: #703;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;.subtitle {&lt;br /&gt; color: #866;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;.toolbar {&lt;br /&gt; color: #04b;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;.tagging, .tagged {&lt;br /&gt; border: 1px solid #eee;&lt;br /&gt; background-color: #eee;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;.selected .tagging, .selected .tagged {&lt;br /&gt; background-color: #ddd;&lt;br /&gt; border: 1px solid #bbb;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;.tagging .listTitle, .tagged .listTitle {&lt;br /&gt; color: #014;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;.tagging .button, .tagged .button {&lt;br /&gt; border: none;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;.footer {&lt;br /&gt; color: #ddd;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;.selected .footer {&lt;br /&gt; color: #888;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;.sparkline {&lt;br /&gt; background: #8cf;&lt;br /&gt; border: 0;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;.sparktick {&lt;br /&gt; background: #014;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;.errorButton {&lt;br /&gt; color: #ff0;&lt;br /&gt; background: #f00;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;.cascade {&lt;br /&gt; background: #eef;&lt;br /&gt; color: #aac;&lt;br /&gt; border: 1px solid #aac;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;.imageLink, #displayArea .imageLink {&lt;br /&gt; background: transparent;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;/*}}}*/&lt;br /&gt;/***&lt;br /&gt;''The viewer is where the tiddler content is displayed'' /%------------------------------------------------%/&lt;br /&gt;***/&lt;br /&gt;/*{{{*/&lt;br /&gt;&lt;br /&gt;.viewer .listTitle {list-style-type: none; margin-left: -2em;}&lt;br /&gt;&lt;br /&gt;.viewer .button {&lt;br /&gt; border: 1px solid #db4;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;.viewer blockquote {&lt;br /&gt; border-left: 3px solid #666;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;.viewer table {&lt;br /&gt; border: 2px solid #333;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;.viewer th, thead td {&lt;br /&gt; background: #db4;&lt;br /&gt; border: 1px solid #666;&lt;br /&gt; color: #fff;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;.viewer td, .viewer tr {&lt;br /&gt; border: 1px solid #666;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;.viewer pre {&lt;br /&gt; border: 1px solid #fe8;&lt;br /&gt; background: #ffc;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;.viewer code {&lt;br /&gt; color: #703;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;.viewer hr {&lt;br /&gt; border: 0;&lt;br /&gt; border-top: dashed 1px #666;&lt;br /&gt; color: #666;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;.highlight, .marked {&lt;br /&gt; background: #fe8;&lt;br /&gt;}&lt;br /&gt;/*}}}*/&lt;br /&gt;/***&lt;br /&gt;''The editor replaces the viewer in the tiddler'' /%------------------------------------------------%/&lt;br /&gt;***/&lt;br /&gt;/*{{{*/&lt;br /&gt;.editor input {&lt;br /&gt; border: 1px solid #04b;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;.editor textarea {&lt;br /&gt; border: 1px solid #04b;&lt;br /&gt; width: 100%;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;.editorFooter {&lt;br /&gt; color: #aaa;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;/*}}}*/</description>
<link>http://xna.tiddlyspot.com//#StyleSheetColors</link>
<pubDate>Fri, 22 Sep 2006 09:13:00 UTC</pubDate>
</item>
<item>
<title>SiteTitle</title>
<description>[[Xna Goodies|http://xna.tiddlyspot.com]]</description>
<link>http://xna.tiddlyspot.com//#SiteTitle</link>
<pubDate>Fri, 22 Sep 2006 09:12:00 UTC</pubDate>
</item>
<item>
<title>Viewing DirectX Debug Output</title>
<description>The error reporting of Xna/~DirectX is not that great, most of the time if you do something wrong you'll just get an {{{InvalidCallException}}} which isn't telling you much. That's because ~DirectX expects you to be looking at the debug output for more information. So how do you see the debug output? That's what I'm about to tell you.&lt;br /&gt;&lt;br /&gt;* [[Download DebugView]]&lt;br /&gt;* [[Switch to Debug DirectX runtimes]]&lt;br /&gt;* [[Watch lots of interesting text appear]]&lt;br /&gt;</description>
<category>Articles</category>
<link>http://xna.tiddlyspot.com//#%5B%5BViewing%20DirectX%20Debug%20Output%5D%5D</link>
<pubDate>Sat, 2 Sep 2006 22:29:00 UTC</pubDate>
</item>
<item>
<title>HorizontalMainMenuStyles</title>
<description>/***&lt;br /&gt;To use, add {{{[[HorizontalMainMenuStyles]]}}} to your StyleSheet tiddler, or you can just paste the CSS in directly. See also HorizontalMainMenu and PageTemplate.&lt;br /&gt;***/&lt;br /&gt;/*{{{*/&lt;br /&gt;&lt;br /&gt;#topMenu br {display:none; }&lt;br /&gt;#topMenu { background: #3a3; }&lt;br /&gt;#topMenu { padding:2px; }&lt;br /&gt;#topMenu .button, #topMenu .tiddlyLink {&lt;br /&gt; margin-left:0.5em; margin-right:0.5em;&lt;br /&gt; padding-left:3px; padding-right:3px;&lt;br /&gt; color:white; font-size:115%;&lt;br /&gt;}&lt;br /&gt;#topMenu .button:hover, #topMenu .tiddlyLink:hover { background:#178;}&lt;br /&gt;&lt;br /&gt;#displayArea { margin: 1em 15.7em 0em 1em; } /* so we use the freed up space */&lt;br /&gt;&lt;br /&gt;/* just in case want some QuickOpenTags in your topMenu */&lt;br /&gt;#topMenu .quickopentag { padding:0px; margin:0px; border:0px; }&lt;br /&gt;#topMenu .quickopentag .tiddlyLink { padding-right:1px; margin-right:0px; }&lt;br /&gt;#topMenu .quickopentag .button { padding-left:1px; margin-left:0px; border:0px; }&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;/*}}}*/</description>
<link>http://xna.tiddlyspot.com//#HorizontalMainMenuStyles</link>
<pubDate>Sat, 2 Sep 2006 22:24:00 UTC</pubDate>
</item>
<item>
<title>Watch lots of interesting text appear</title>
<description>If you have the debug runtimes selected then you should see a fair bit of information being output about what ~DirectX is doing when you run your game. Here is the output I saw for a small program I wrote, this program was failing with an {{{InvalidCallException}}} in the {{{GraphicsDevice.StretcRect()}}} method. That wasn't very useful but if you look at the debug output you can see exactly what the problem was:&lt;br /&gt;{{{&lt;br /&gt;[4660] Direct3D9: (INFO) :Direct3D9 Debug Runtime selected.&lt;br /&gt;[4660] &lt;br /&gt;[4660] D3D9 Helper: Enhanced D3DDebugging disabled; Application was not compiled with D3D_DEBUG_INFO &lt;br /&gt;[4660] Direct3D9: (INFO) :======================= Hal HWVP device selected &lt;br /&gt;[4660] &lt;br /&gt;[4660] Direct3D9: (INFO) :HalDevice Driver Style 9 &lt;br /&gt;[4660] &lt;br /&gt;[4660] Direct3D9: :DoneExclusiveMode&lt;br /&gt;[4660] &lt;br /&gt;[4660] Direct3D9: (INFO) :Failed to create driver indexbuffer&lt;br /&gt;[4660] &lt;br /&gt;[4660] Direct3D9: (ERROR) :Destination textures passed to StretchRect or ColorFill must have D3DUSAGE_RENDERTARGET set &lt;br /&gt;}}}&lt;br /&gt;The last line clearly shows why I was getting a problem. So, go use it and master those errors.&lt;br /&gt;</description>
<link>http://xna.tiddlyspot.com//#%5B%5BWatch%20lots%20of%20interesting%20text%20appear%5D%5D</link>
<pubDate>Sat, 2 Sep 2006 22:23:00 UTC</pubDate>
</item>
</channel>
</rss>