Refactoring to Learn a New Code Base

When you join a team with a large existing code base, it can be intimidating. How long does it take to become familiar with a million lines of code? I don’t have the answer to that question, but based on my past experience it easily takes several years if not more. Meanwhile, the rest of the team is adding and changing code all the time. When I apply small, focused, systemic refactorings to a code base, I visit lots of code that may be unfamiliar to me. Visiting unfamiliar code and making the same kind of systematic change throughout can help me become more familiar with the code.

Read the rest of this entry »

Spring 2014 Utah Code Camp: March 15th, 2014

The Spring 2014 Utah Code Camp is coming up and I’ve got some proposed sessions. Utah Code Camps are by the developer community and for the developer community. Utah Code Camp is always free! Spring 2014 Utah Code Camp will be held on March 15th, 2014 at the University of Utah Spencer Fox Eccles Business Building.

Read the rest of this entry »

Game Debugging in Visual Studio 11

If you haven’t watched any of the //build presentations yet, there was one that got me quite excited where they showed off some of the new graphics debugging support in Visual Studio 11. Game Debugging in Visual Studio 11 is a recent Visual Studio team blog entry that goes into more detail on this. Now you can really drill down into the details of the graphics pipeline based on what you’re seeing in the rendered window and some mouse clicks. This is going to be awesome!

Utah Fall Code Camp 2011

The Utah Fall Code Camp 2011 is coming up and I’ve proposed a number of talks and volunteered to present some that didn’t yet have speakers. If any of these sessions sound interesting to you, please visit the Utah Code Camp web site and vote for them.

  • Open Source Development Track: Recursive Descent Parsers with Boost.Spirit
  • Microsoft Development Track: Powering Managed Applications with the GPU and SlimDX
  • Architecture Track: High Performance C++, or How to Make Friends With the Cache

The following talks already existed but had no speaker yet, so I volunteered to give them:

  • Mobile Development Track: Push Notifications and Tiles for Windows Phone
  • Mobile Development Track: Game Development for the Windows Phone 7.5

Read the rest of this entry »

Microsoft MVP for Another Year!

On October 1st, 2010 I was awarded Microsoft MVP status for another year of helping developers with Microsoft’s 3D related technologies of DirectX and XNA, although mostly DirectX. This marks the 9th consecutive year in which I’ve been awarded MVP status. In these past 9 years we’ve watched the PC’s graphics card make the transition from something that might not have hardware accelerated vertex processing to the array of parallel processors in the current generation of graphics cards. Besides the obvious addition of more shader cores on the GPU, what will the next 9 years hold for the PC’s graphics card? Will image-based and video-based rendering become commonplace and mainstream? Will 3D finally penetrate into the display, removing that pesky Z divide in the projection matrix? Its hard to say, but as always, it will be interesting to find out!

Need Tessellation?

Try libtess2, a refactored version of the GLU tessellation code from OpenGL. Brought to you by Digesting Duck.

Utah Fall Code Camp on Sept. 25th, 2010

Utah Fall Code Camp on September 25th, 2010. I’ve submitted several sessions to the organizers: one on using DirectWrite in C# with SlimDX, an enhanced version of my talk on internet enabled applications for Windows Phone 7 and an updated version of the “You Can Test Anything!” session that Zhon Johansens and I delivered at AgileRoots 2010.

June 2010 DirectX SDK Documentation Now on MSDN

The documentation for the Windows Graphics was already available, now the entirety of the documentation for the June 2010 release of the DirectX SDK is available on MSDN.

DirectX SDK Documentation on MSDN

GameFest 2010 Content Now Live

The GameFest 2010 content is now live on Microsoft’s site:

GameFest 2010 Presentations

DirectX SDK June 2010 Release

The June 2010 release of the DirectX SDK is now available for download.

Release Notes

Of particular interest to me are the new debugging intrinsics added to HLSL: printf, errorf and abort. This should make it much easier to create unit tests for HLSL code as the unit test can now report back an assertion failure message instead of just true/false.

dxprof – GPU Profiling Tool

Sergey Nenakhov posts to the DirectX developer list that he’s created a GPU profiling tool for Direct3D applications:

I’ve created a tool, which hooks directx api inside any desired application. Then each draw call will be wrapped with asynchronous timing query, and when timing info arrives for all draw calls made during a frame an overlay is rendered showing you the timing information of each dip (or memory transfer) in a compact and informative manner. For deeper analysis you can press the ‘~’ button (or whatever key you have below the ESC) to pause the sampling, and when paused, mousing over any bar will show you the callstack where that draw call was made with precise timing information about that call. I personally find this tool extremely useful because it can show you the bottleneck of your application very quick, and also it shows relative costs of various stuff you have going on in your application, giving you a significantly better understanding of the performance aspect of your game.

I haven’t tried this tool myself, but it looks interesting and might prove valuable to any Direct3D developer trying to performance tune their application. (Remember: first get it right, then get it tight! Or, as Donald Knuth says, “Premature optimization is the root of all evil.”)

A Managed Path to DirectCompute

Fellow MVP Miha Markič has written up a blog post about his experience with DirectCompute and managed code.

Direct2D Debug Layer Available

Over at the DirectX blog, they’ve announced the Direct2D Debug Layer. For those of you using Direct2D, this will be a welcome addition to figuring out problems with using the API.

VMWare Workstation 7 Supports More 3D

VMWare Workstation 7 now has better support for 3D graphics with Direct3D 9.0c with Shader Model 3 and OpenGL 2.1 support. I’ve always liked VMWare for testing, particularly for testing installations. The one drawback with it has been the 3D support; sure, it was always great for testing business applications in multiple OS environments from a single machine, but for graphics applications it was pretty weak. Where I work, we recently bumped up the minimum OpenGL requirement to version 1.4 and that was not supported in VMWare Workstation 5. Now that VMWare 7 is out, I’ll try the upgrade and see how the new version supports our applications. I’m not expecting it to be as fast as a native machine, but I’m willing to pay a performance penalty for an environment where I can reset to known conditions quickly. Our applications are content creation applications, so while its annoying to have them perform poorly during testing, its not going to make the testing worthless.

Nick Gravelyn on SunBurn

Direct3D Test Doubles, Part 1

When developing Direct3D code using test-driven development, you need test doubles to stand in for interfaces used by your code. This way you can control the interaction of your system under test with its environment. This post is the first in a series of posts that discuss several ways you can create test doubles for the COM interfaces used by a Direct3D application.

Read the rest of this entry »

Direct3D Graphics Pipeline Sample Code

I’ve created a project on codeplex, http://d3dgraphicspipeline.codeplex.com, to house the sample code from my book. It will also be used to distribute sample code on other Direct3D related articles that I write on this blog. Initially you will find the code from my article on description helpers, but I will be uploading the sample code from the book there in the next few days.

Direct3D Programming Tip #9: Use The Managed Resource Pool

Resource management can be a challenge for Direct3D applications. Before DirectX, display adapters had limited amounts of fast device memory and programmers had to manage that memory manually in order to achieve the best performance. The Direct3D API provides different memory pools to allow the application to specify the lifetime management policy of a resource.

Read the rest of this entry »

DirectX SDK (August 2009)

Microsoft has finally published the August 2009 DirectX SDK. This is the version of the SDK that includes the final information for Direct3D 11. A summary of what’s new in the SDK and known issues are at the bottom of the download page.