[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Loki...



On Sat, Jan 26, 2002 at 09:14:26PM -0600, Steve Baker wrote:
> Dennis Payne wrote:
> 
> > This has puzzled me for some time.  Why would you use DirectX?
> 
> Well, if you are writing for Windoze *only* (as most people are), then
> it is simply the native game API.  It covers sound, graphics (2D and 3D),
> joystick, mouse, keyboard, etc.
> 
> Things like force-feedback joysticks are really only possible through
> Direct-X.
> 
> > Does
> > anyone know of any benefits beyond better support for Direct3D over
> > OpenGL?
> 
> I think it's a matter of debate whether D3D is better than OpenGL...I
> don't think it is better.  Either way, D3D isn't in any way portable
> but OpenGL is completely portable - so for me, there is no choice.
> 
> >  Does Diablo use any DirectX tricks that wouldn't be possible
> > under SDL?  Or are the commercial developers just comfortable with
> > DirectX and aren't looking beyond it?
> 
> That's it I think.


Agreed, I think that there is an unquantifiable warm fuzzy that many
game dev. studios get from working with the native API. 

However, there are some quantifiable benefits to DirectX. Some of the
more modern graphic hardware features are provided under somewhat
standardized interfaces. At least the pretense of standardization is
maintained -- it usually takes MS a generation or two to settle down
on the API. On the other hand, any features beyond the core OpenGL
1.1, 1.2 spec are often provided under nonstandardized vendor specific
extensions.

So when you shiny new game engine tries to use pixel shaders, under
DirectX there is the hope (however faint) that you won't have to
change a thing in your game engine for nVidia vs ATI cards.
Realistically though, even though the DirectX API to access new
features may be more standardized, you still end up making adjustments
for capabilities of different cards. (just in fewer portions of code)

The funny thing is that (at least at the game dev studio I worked at)
they often write wrappers to the interface to such functionality
anyway to simplify/insulate themselves from the lower level API's.  So
if you have already invested in a good architecure to handle
card-to-card variations (and maybe platform to platform too), it
really doesn't make a big difference if you're calling a slightly
different vendor OpenGL extensions either. Then we're back to the
warm fuzzy...

-- Alan Chen 
Digikata LLC 
http://digikata.com