Tuesday, December 14, 2010

More D3D11 Tests

It's been a while since I mentioned this so I just thought I'd update with the current status of my D3D11 tests.

My simple "hello world" application - currently at the stage of putting a coloured triangle on screen - is now up to 450 lines of code (this is with lots of duplicate code from the SDK samples merged and refactored). Recently I went utterly hog-wild and created a depth buffer, the full code for which added almost 100 extra lines to the app.

My initial impressions of D3D11 (and 10, which is almost identical) - i.e. that it's a return to the bad old days of D3D3 all over again - are further reinforced by this experience. Two things here - creating a state object for your current depth/stencil state and creating the depth/stencil buffer itself - are identical in concept (if not in implementation) to execute buffers and DirectDraw surfaces.

Handling all of the different depth/stencil states that Quake requires seems like an - interesting - task. Depth enabled but no write, depth enabled with write, z-fail, z-pass, and all combined with various stencil states too. About 16 in all, each of which needs - say - 20-30 lines of code to set up.

It's almost as if everyone has forgotten what D3D3 was really like. I'd laugh only it's not funny.

Anyway, the upshot of the experience is that DirectQ is definitely going to stay at D3D9, thank you very much. It was a nice idea (and having a definite reason to drop the fixed functionality code would have been good) but it seems as though D3D evolution has taken a rather strange turn lately. What had become a very elegant, functional and easy to use API is now right back at it's ugly roots, and maybe we'll need to wait until D3D15 or so before sanity returns.

Despite that I'm going to plough ahead with the test app and implement textures. At this stage I'm only doing it for a sense of grim satisfaction so there's no real timescale here; I'll update on this particular one as and when I get round to it, which will likely only happen when I'm taken by a peculiar mood.

6 comments:

Anonymous said...

microsoft seems to do this kind of stupidness with their Os-es too: windows 98 was great, ME sucked, XP was great, vista sucked, 7 is great and i bet 8 will suck

hondobondo

Anonymous said...

except win98 wasn't great. at all.

Anonymous said...

i used it for years. it played games. it rarely crashed. what else can you say? winnt couldn't play anything. linux? mac? nintendo 64?

Anonymous said...

call me crazy, but I prefered win95b to win98 - in might have had more bugs, but its bugs seemed slightly more predictable, rather than random crashes.

Kodify_or_not said...

Mesa/llvmpipe/gallium3d is supposed to have some new directx11 code.

Personally, I'm just annoyed at all the directx>opengl opengl>directx wrappers that are becoming slowly outdated with each new release. XD

Please publish your comments for the quake wrappers. To those of us porting code... a list of equivalences would be more useful than gold.

Not that I'm actually porting code... yet. XD

mhquake said...

> call me crazy, but I prefered win95b to win98 - in might have had more bugs, but its bugs seemed slightly more predictable, rather than random crashes.

I actually agree with you here; Windows 98 really took that old OS too far and it showed. Although 98 SE was OK, mostly because it had IE 5 instead of 4.

> Please publish your comments for the quake wrappers. To those of us porting code... a list of equivalences would be more useful than gold.

Everything to do with the Quake wrappers has already been published. Full source code, sample implementations, everything. I had intended to write some documentation for them, but the end result turned out so simple to implement that it wasn't needed.