Can you elaborate on your graphics API?
Ok, a bit of a rant incomming...
Basically
xen is my attempt to build a minimalist and clean api atop xna, doing as best I can to reduce errors and do things like reduce redundant API calls (without draw reordering).
There are certain parts of XNA which are, frankly, hideous - usually the bits which are direct wrappers on their DirectX counterparts.
The annoying thing is, here is an API in a totally different language (C# to C++) yet it's almost a literal translation an aging API. XNA makes very few attempts to really take advantage of the .net runtime and language to clean up the API.
And the areas where it does try and abstract things sometimes have ended up screwing up in some way. For example, they abstracted out BeginScene/EndScene in XNA 1.1, which caused all sorts of problems where doing things in certain orders would screw up (eg, creating resources within a BeginScene block).
It's like the API is fighting two wars, one to be 'Managed DirectX 3' and one to be a high level API for beginners. The result is a nasty mix of the two, where both make compromises to each other - and neither truly manages it's goal.
Two examples of this:
They have SpriteBatches, which are instanced 2D sprites. Great for beginners!, expect they change render state in unexpected and undocumented ways (eg, texture clamping) which cause all sorts of pain for newbies. The solution; opt-in wrap them in a StateBlock, which are *horribly* inefficient as they store the entire render state (right down to shader constants). In which case their performance tanks.
Another really simple example is Matrix.CreateLookAt(). Obvious? no. XNA has no concept of a camera, and nothing built in to manage world matrices, etc. So... CreateLookAt() inverts the matrix it returns, because they have assumed most people will use it for a camera.. But there is no concept of a camera, so it 'has' to return a view matrix. A really simple example of a bad decision to 'help' which ends up causing more trouble.
Using things like HLSL Effects are somehow even worse, and vertex declarations are simply heinous
.
These are things I've tried to improve. Eg, I totally replace Effects, and use reflection to generate vertex declarations.
I'm not saying XNA is a disaster. It's far from it. It's still very, very good.
It's just a shame because it had ridiculous potential to be something totally amazing. Whereas it's more like a new coat of paint on a slightly rusty hull.