Beyond3D is very proud to present the first part of an on-going series featuring one man's thoughts and experience on modern engine development. Read the full news item
A more interesting approach, is to choose neither of them, and to write an abstraction layer which will hide all API specific code inside a module, making the engine API agnostic. With such a layer, the engine will be able to use the best API for a given system, to ensure high performance. The drawback of having an abstract renderer interface is that it must target least common denominator of the APIs it'll be hiding, or the engine will need some tweaks to target some platforms. Still, since the code is nicely encapsulated, changes, even engine broad, will be much easier to deal with.
Nice read, I dont like programming but its very interresting to learn more about how a engine works.
Something I didnt totally understand was this:
In what code is your engine written? you write in language X and code the layer to translate all the code in the engine to either opengl or DX?
Has anyone sent this article to 3DRealms and the Duke Nukem Forever team, yet?
Not longer true for Vista (and therefore not true for D3D10 altogether). Please fix.On one hand you have Direct3D, pushed by Microsoft, with a rather nice interface (in its 9th and 10th versions), but suffering from a severe draw call issue. Draw calls on certain Direct3D platforms force a kernel context switch, which has an ultimate performance cost.
So draw calls are completely free on Vista now? Methinks not.Not longer true for Vista (and therefore not true for D3D10 altogether). Please fix.
So draw calls are completely free on Vista now? Methinks not.
As for it not being the context switch that's the issue with 9, it certainly is on XP. There's (almost) no expensive format conversion done in D3D9 titles whatsoever, and you hit the call limit precisely because it's an in-kernel operation under XP (and 2K/9x).
Has anyone measured batch count limits on XP vs. Vista using the same DX9 code? Both the ring transition and the DP2 buffering are gone in Vista (which unfortunately means we can't isolate them), so I'd imagine draw overhead would be lower on Vista. But I haven't seen any data.
The final problem is that trying to do things the DX9 way in DX10 isn't always efficient. Constant buffers are the biggest problem here (look at all of the MS, AMD, and NV developer presentations about DX10 -- they all harp about this) -- in DX9 you only have one constant buffer but you can update individual constants efficiently. In DX10 you have lots of constant buffers, but you can't change individual elements of a buffer -- you have to rewrite the entire thing each time. The efficient way to manage this in DX9 is very inefficient if translated directly to DX10, and the efficient way to do it in DX10 is not possible in DX9. This makes it very hard for games that use both DX9 and DX10 to optimize for both -- and since they're mostly developed on DX9, that's what they optimize for.
I am not as knowledgeable as you guys are in this forum, but I had a question...all these directx 10 games...so called...how come they are not reflecting the performance that was being touted by Microsoft...they were saying how the games would run a lot faster because of the driver overhead being non-existent or something like that. Does it not seem that in a lot of benchmarks the DX 9 version is faster than the DX 10 version? Is it because drivers and the hardware are not optimized for DX 10? Or are programmers designing games not used to dX 10? Just trying to understand...
Also another question...when they say that this engine scales really well...well I guess a better way to put it is COD 4 vs Crysis...I have seen screenies and accounts from people i know who have played both Crysis and COD4...and say COD4 was brilliant looking and ran on their system just fine whereas Crysis brought their system down to its knees...just trying to understand what makes Crysis game's engine so heavy when COD4 breezes through while looking just as good on lower end systems?