[SDL] Re: which directx version is required?

Daniel Vogel vogel at lokigames.com
Thu Dec 21 11:45:47 PST 2000

Sam Lantinga wrote:
> > i'm trying to determine exactly which version of directx is required
> > for SDL on windows? (well, at least for the 'directx' driver)
> > i thought (and others in #sdl) that directx5 was all that was required.
> > in the latest cvs headers are the following lines...
> > #define DIRECTDRAW_VERSION  0x0700
> > #define DIRECTSOUND_VERSION 0x0700
> > #define DIRECTINPUT_VERSION 0x0700
> > this would seem to imply directx7 is needed to run directx.
> > have there been changes to SDL that now require v7 over v5?
> The gamma ramp code is only supported in DirectX 6 or newer.
> Since DirectX 6 was an intermediate version immediately followed by
> the more stable DirectX 7, I decided to use that define instead.
> SDL compiles with the DirectX 6 SDK with the above defines,
> but no longer compiles with the DirectX 3 SDK.  Hum.
> For 1.3, I'll probably rewrite the SDL video code for the DirectX 8 SDK,
> which no longer separates DirectDraw and Direct3D.  The reason for this
> is that driver writers will be maintaining code for the new API, and
> their backwards compatibility will probably slowly break.  SDL 1.3 is
> far enough in the future for a usable version, that I think this is okay.

Windows NT only has DirectX 5 IIRC.

> > if SDL can run with directx5 and just switching these to 0x0500
> > would allow it to run with directx5 then that seems like a worthwhile
> > adjustment?
> Yes, but then DirectX gamma control is no longer possible.

You don't have to use DirectX to set the gamma ramp. You can use
SetDeviceGammaRamp to do that though the DirectX version should work in
more cases (at least that's what the docs say).

                            Daniel Vogel, Programmer, Loki Software Inc.

More information about the SDL mailing list