Direct3D under SDL - is it -possible-?

This isn’t about OpenGL. I’m going to ask as clearly as possible:

Can Direct3D be used with SDL?

That’s all. I’m not interested in hearing why -not-. Just is it
possible? (and better if there’s examples :slight_smile: If there isn’t any examples
this will be my project-of-the-day :slight_smile:

And if it can’t I’m curious why not?


offtopic rant follows. Anyone who wants to answer this question with
-any- reference to OpenGL should read this rant. Everyone else please
ignore :slight_smile:

Either way it -should- be a FAQ entry under the Windows FAQ. Because every time this has been asked it's started an "OpenGL is what you should use" thread. *grr*. I mean would I be better asking how to get SDL working as a package under emacs? (and then hear flames of nonportability and 'vi is better'?) (actually sudden thought.... nah. It should be easy though :) aside: the opengl/direct3d conflict has -no- relation to vi/emacs vs just being a conflict. Just to head off flames (hopefully) before they begin

G’day, eh? :slight_smile:
- Teunis

PS: SDL -does- have uses other than portability.
PPS: replies to the rant via private email. if at all. This argument
doesn’t fit the list (SDL development and help).

This isn’t about OpenGL. I’m going to ask as clearly as possible:

Can Direct3D be used with SDL?

I guess it depends on what you want to use SDL for.
If you want to use SDL for the sound and input aspects, You may be out of luck
because (and correct me if I’m wrong) the sub systems needed for those
features are closely tied in with the video system and I think DirectX may
give you some hassle because it doesn’t have exclusive access to the video
system.

But I have to ask, If you want to use Direct3D, why are you worrying about SDL
at all? SDL’s main goal in life is to provide a cross platform interface to
the hardware used in games. It doesn’t offer anything to O****L (I didn’t say
it :slight_smile: ) apart from somewhere to render to. Direct 3D does this for you
doesn’t it? or at least DirectX can set it up easy enough…

If you want to use SDL to set up the video for you because it’s a lot easier,
then I think you’re going to be out of luck. Unless Microsoft release the
code for DirectX so people can compile it on other platforms.
SDL will always be cross platform as as such, I do not foresee it having hooks
into Direct3D. and then you’ve got another DLL to ship.

if you want to go down the Direct 3D road, you may as well go the whole hog
and dive into DirectX properly, there are plenty of books on it.

Just be careful in there. DirectX has a habbit of making parts of itself
obsolete… Direct Draw… Immediate Mode… or was it retained mode, it’s been
a while :slight_smile:
I heard somewhere that DirectDraw doesn’t exist in DirectX8 anymore and I know
the really easy 3D mode has gone.

So for me it’s SDL and OpenGL, I won’t go back to DirectX. The grass is so
much greener this side :slight_smile:

Hope this helps

JasonOn Friday 07 June 2002 12:57 am, Teunis Peters wrote:

That’s all. I’m not interested in hearing why -not-. Just is it
possible? (and better if there’s examples :slight_smile: If there isn’t any examples
this will be my project-of-the-day :slight_smile:

And if it can’t I’m curious why not?


offtopic rant follows. Anyone who wants to answer this question with
-any- reference to OpenGL should read this rant. Everyone else please
ignore :slight_smile:

Either way it -should- be a FAQ entry under the Windows FAQ. Because every time this has been asked it's started an "OpenGL is what you should use" thread. *grr*. I mean would I be better asking how to get SDL working as a package under emacs? (and then hear flames of nonportability and 'vi is better'?) (actually sudden thought.... nah. It should be easy though :) aside: the opengl/direct3d conflict has -no- relation to vi/emacs vs just being a conflict. Just to head off flames (hopefully) before they begin

G’day, eh? :slight_smile:

  • Teunis

PS: SDL -does- have uses other than portability.
PPS: replies to the rant via private email. if at all. This argument
doesn’t fit the list (SDL development and help).


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl

This isn’t about OpenGL. I’m going to ask as clearly as possible:

Can Direct3D be used with SDL?

I guess it depends on what you want to use SDL for.
If you want to use SDL for the sound and input aspects, You may be out of luck
because (and correct me if I’m wrong) the sub systems needed for those
features are closely tied in with the video system and I think DirectX may
give you some hassle because it doesn’t have exclusive access to the video
system.

But I have to ask, If you want to use Direct3D, why are you worrying about SDL
at all?

I guess he (just like me) prefers the SDL API over just about any alternatives. It does the job well, it’s clean and simple, and it’s portable.

SDL’s main goal in life is to provide a cross platform interface to
the hardware used in games. It doesn’t offer anything to O****L (I didn’t say
it :slight_smile: ) apart from somewhere to render to. Direct 3D does this for you
doesn’t it? or at least DirectX can set it up easy enough…

Maybe… (Although I would disagree when thinking about my former experiences with DirectX - and I’m not even talking about the Direct3D part.)

If you want to use SDL to set up the video for you because it’s a lot easier,
then I think you’re going to be out of luck. Unless Microsoft release the
code for DirectX so people can compile it on other platforms.
SDL will always be cross platform as as such, I do not foresee it having hooks
into Direct3D.

Good point - but I definitely think it could be done. (Let’s not discuss whether I believe it should be done or not. Most of you know what I think about Microsoft’s methods already.)

and then you’ve got another DLL to ship.

But that’s the developer’s problem (as always), isn’t it?

if you want to go down the Direct 3D road, you may as well go the whole hog
and dive into DirectX properly, there are plenty of books on it.

Right - but lets say you have a game using SDL for everything but 3D, and OpenGL for 3D. Then you want to add a Direct3D rendering layer to your engine, to improve the chances of “non-geek” WinXP users getting your game game to run at all. In that case, I can see why one would like to part only the rendering layer, and not the whole game. (Rendering may be the biggest “system interface” in a game, but the other stuff still takes time to port and perhaps most importantly, debug.)

(As much as I hate what MS is doing to OpenGL, this probably isn’t a battle for anyone but the biggest game companies around. Freeware hackers may do whatever they like, but companies need to sell games.)

Just be careful in there. DirectX has a habbit of making parts of itself
obsolete… Direct Draw… Immediate Mode… or was it retained mode, it’s been
a while :slight_smile:

Retained mode. (Makes sense… If no one else could make an API that high level truly useful, why would MS?)

I heard somewhere that DirectDraw doesn’t exist in DirectX8 anymore and I know
the really easy 3D mode has gone.

Right; they’re basically going the same way I’m doing with glSDL, only with Direct3D. (And “the really easy 3D mode” was Retained Mode.)

So for me it’s SDL and OpenGL, I won’t go back to DirectX. The grass is so
much greener this side :slight_smile:

Ahem! :wink: (Although I do agree. :slight_smile:

//David

.---------------------------------------
| David Olofson
| Programmer

david.olofson at reologica.se
Address:
REOLOGICA Instruments AB
Scheelev?gen 30
223 63 LUND
Sweden
---------------------------------------
Phone: 046-12 77 60
Fax: 046-12 50 57
Mobil:
E-mail: david.olofson at reologica.se
WWW: http://www.reologica.se

`-----> We Make Rheology RealOn Fri, 7/06/2002 01:21:18 , Jason Farmer wrote:

On Friday 07 June 2002 12:57 am, Teunis Peters wrote: