Citizen: Graphics API isolation.
Since last time I posted I've worked on the graphics system, trying to isolate as much API-specific code as possible. Before I began my GraphicsDevice class which is the graphics system motor was littered with DirectX9-specific code, and some of it even leaked out into the calling application. I'd like to keep my options open for multiple API support later on, like DX10 and/or OpenGL, so this really had to go.
My solution to this was to make GraphicsDevice into an interface (IGraphicsDevice) that exposes common graphics operations to the application. The interface is then implemented by D3D9Device which encapsulates all DX9-specific calls. This restructure wasn't entirely painless. I had to write some helper classes to port things like coordinates from DX9 to non-DX9, and I'm still in a process of adjusting which methods should be known by IGraphicsDevice and which should be internal to D3D9Device.