But I have been doing stuff.
I’ve been spending my time refactoring and just cleaning up the code in Gorgon. I made the mistake of getting Resharper and it put me on this crusade of cleaning up the code because apparently I’m just awful. Also, I’ve been finishing up the primary graphics API (not the 2D stuff) by adding a bunch of new things to it like geometry shaders, compute shaders, and hull/domain shaders for tesselation (this one is cool, if not a little baffling). I also made the API a little closer to Direct 3D 11 by adding views to resource object types.
Wait, what are views? Well, I’m glad you didn’t ask. Basically it’s a view of a resource from the shader. You can take view of a resource, or just a piece of the resource and even change the resource format (a little, not very much, basically if you have R8G8B8A8 you can do R8G8B8A8_Float or R8G8B8A8_UInt, but it’s better than nothing). You can also create multiple views for a resource and for shader resource views you can bind them at the same time (provided it’s a different sub resource). Included with these are shader resource views which allow us to bind a texture or buffer to a shader (even vertex/index buffers). You can also create unordered access views which allow you to write back to the resource. This allows for some fun things with textures. Then there’s also a render target view which are used with render target textures, but can also be used with buffers and finally depth stencil views.
The render target system got an overhaul. Render targets are now inherited from textures and you can have 1D/2D/3D render targets (or render targets that use an arbitrary buffer). These targets can be casted between the texture type and the render target type. Swap chains are a special case and can be used as a render target view and casted to a render target/2D texture.
The depth/stencil buffers also got an overhaul and 1D/2D depth/stencil buffers are inherited from 1D/2D textures and can be casted between textures and depth/stencil types.
Render targets, textures, buffers and swap chains are also implicitly castable to views because they can be created with default views (textures/render targets always have one unless they’re staging resources).
This was/is a monumental amount of work, and is not done yet. I have most of the D3D 11 API mapped to my graphics API and I have 2 major features to put in:
- Stream output – Allows the sending of geometry data back to a buffer.
- Deferred contexts – Allows the graphics commands to be deferred until they’re needed, thereby saving some performance.
Once that’s done I plan on getting back to finishing up my code clean up in the other APIs, finishing up the editor and adding examples to the library. Hopefully it’ll be done before Microsoft fucks everything else up and we’re all off using Linux or some other equally nightmarish operating system.