A Generic Helper For XNA Services

Sick of lines like these in your Game Components? :

graphicsService = (IGraphicsDeviceService)Game.Services.GetService(typeof(IGraphicsDeviceService));

Well, me too. And since my efforts to bring it up in the XNA forums were a bit fruitless, I decided to give it a shot.

Here’s a pretty small snippet that will save you tons of typecasts and typeofs.
Just enclose with your favourite namespace declaration.

Continue reading A Generic Helper For XNA Services

XNA Effect Compiling Tool


EffectCompilingTool.rar [41.5kb] – XNA GSE 1.0 Refresh Project w/ Binaries


I love the content pipeline in XNA, but for effects, like the author of the XNA Effect Generator understood and mentioned already, it’s just not practical.

I liked the XNA Effect Generator too, but I wanted to implement my own effect framework so the generated classes were not what I was looking for either. Besides I had some problems with it (localization issues, dreaded french accents…). So I made a little tool that gets the Xbox 360 and Windows byte-code out of a shader in a convenient format and presentation.

Continue reading XNA Effect Compiling Tool

How To (Properly) Use Windows Forms With XNA

Only works with XNA GSE 1.0 Refresh, not 2.0!

Update : See this post for a working sample!

Here’s something I had some difficulty doing “gracefully” with XNA : force a custom render device and user controls in the window while still using the Game framework. It’s quite easy to initialize XNA in a Managed DirectX fashion but you lose the links to the graphics device manager, the content pipeline and a lot of very useful (and well written) code behind the Game class.

Continue reading How To (Properly) Use Windows Forms With XNA