SDL with Direct3D

I’m trying to use SDL with Direct3D API, but after calling of
SDL_SetVideoMode I have to call IDirect3D9::CreateDevice, second paremeter
of which is a window handle. Can I get a window handle of window created by
SDL? And what flags I have to set in fourth parameter of SDL_SetVideoMode?
If I want to my program runs in FullScreen mode, do I need to set flag
SDL_FULLSCREEN or I can do it later in IDirect3D9::CreateDevice method?

Heya,

Im not sure how to do that or if its possible but why not use OpenGL instead
of direct3d?

If you use OpenGL youll be able to easily compile the programs you make for
other operating systems and architectures like linux, BSD, macintosh etc.

Plus in my opinion OpenGL has a much easier to use interface than direct3d
(just like you may be using SDL because it has such a better interface than
the other parts of DirectX).> ----- Original Message -----

From: shd@bk.ru (ALakazam)
To:
Sent: Sunday, August 17, 2003 1:14 AM
Subject: [SDL] SDL with Direct3D

I’m trying to use SDL with Direct3D API, but after calling of
SDL_SetVideoMode I have to call IDirect3D9::CreateDevice, second paremeter
of which is a window handle. Can I get a window handle of window created
by
SDL? And what flags I have to set in fourth parameter of SDL_SetVideoMode?
If I want to my program runs in FullScreen mode, do I need to set flag
SDL_FULLSCREEN or I can do it later in IDirect3D9::CreateDevice method?


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

Im not sure how to do that or if its possible but why not use OpenGL instead
of direct3d?

If you use OpenGL youll be able to easily compile the programs you make for
other operating systems and architectures like linux, BSD, macintosh etc.

Plus in my opinion OpenGL has a much easier to use interface than direct3d
(just like you may be using SDL because it has such a better interface than
the other parts of DirectX).

I agree with all of these.
However, If you want to use DirectX, why use SDL?
You know that your game is running only in Windows
So, why do you use SDL and not Windows API which is a a little bit faster?

Finally, If you have start learning DirectX lately, I suggest you give it up and start learning OpenGL.

  • It is cross-platform
  • It is very easy to learn
  • DirectX is changing in every version (Microsoft sucks) but OpenGL is the same.
  • It is full hardware accellerated
  • It is faster than DirectX (I believe)

try read the red book. Is the OpenGL Bible
http://tassadar.physics.auth.gr/~chameleon/OpenGL/The%20Red%20Book/> > I’m trying to use SDL with Direct3D API, but after calling of

SDL_SetVideoMode I have to call IDirect3D9::CreateDevice, second paremeter
of which is a window handle. Can I get a window handle of window created
by
SDL? And what flags I have to set in fourth parameter of SDL_SetVideoMode?
If I want to my program runs in FullScreen mode, do I need to set flag
SDL_FULLSCREEN or I can do it later in IDirect3D9::CreateDevice method?

I agree with all of these.
However, If you want to use DirectX, why use SDL?
You know that your game is running only in Windows
So, why do you use SDL and not Windows API which is a a little bit
faster?

Finally, If you have start learning DirectX lately, I suggest you give
it up and start learning OpenGL.

  • It is cross-platform
  • It is very easy to learn
  • DirectX is changing in every version (Microsoft sucks) but OpenGL is
    the same.
  • It is full hardware accellerated
  • It is faster than DirectX (I believe)

I agree with all of those, too, but Direct3D seems to have more support
"out of the box" than OpenGL. I want users to download a game and be
playing right away, without even knowing that they should download the
latest drivers for their videocard.

About the portability issue, I was going to write a Direct3D/OpenGL
abstraction layer and program everything on top of that. Because SDL
doesn’t support Direct3D, I’ll also have to rewrite most of the stuff
SDL is already doing for me when using it on top of OpenGL. So I believe
SDL + Direct3D is actually a useful combination.

Lic. Gabriel Gambetta
ARTech - GeneXus Development Team
ggambett at artech.com.uy

I agree with all of those, too, but Direct3D seems to have more support
"out of the box" than OpenGL. I want users to download a game and be
playing right away, without even knowing that they should download the
latest drivers for their videocard.

no! every user with win95 - winME has dx3 (5?) default and will need to
download the latest dx too.
win2k / xp has dx8 and will also need to download dx9 if you use it.

About the portability issue, I was going to write a Direct3D/OpenGL
abstraction layer and program everything on top of that. Because SDL
doesn’t support Direct3D, I’ll also have to rewrite most of the stuff
SDL is already doing for me when using it on top of OpenGL.

So I believe
SDL + Direct3D is actually a useful combination.

why?
you would only use sdl for window creation and directinput. (i think you
would even have to create the window your own to get the hWnd for d3d)

I agree with all of those, too, but Direct3D seems to have more
support “out of the box” than OpenGL. I want users to download a game

and be playing right away, without even knowing that they should
download the latest drivers for their videocard.
no! every user with win95 - winME has dx3 (5?) default and will need
to download the latest dx too. win2k / xp
has dx8 and will also need to download dx9 if you use it.

But at least I’d have some basic hardware accelerated functionality.
Right now, I don’t really need shaders or other fancy stuff.

So I believe
SDL + Direct3D is actually a useful combination.
why?
you would only use sdl for window creation and directinput. (i think
you would even have to create the window your
own to get the hWnd for d3d)

I use SDL extensively, mainly for the compositing engine and image
manipulation. True, I could use SDL just for this and roll my own
D3D/OpenGL code, and/or rewrite the SDL_Surface functionality and
eliminate the dependency to SDL completely, but for me it’s easier to
have D3D support in SDL.

Maybe my situation is unique and is not compatible with the intentions
of the SDL developers, but hey, I don’t lose anything by asking :slight_smile:

Lic. Gabriel Gambetta
ARTech - GeneXus Development Team
ggambett at artech.com.uy

if you just need basic hw acceleration why don’t you stick with sdl? on
windows it uses dx3 to get hardware support (as far as i know).

then your user won’t ever have to donwload new dx drivers and your app would
even run on win95 and NT (there’s no dx9 for this platforms)

anyway. i think you could use d3d if you change the code in sdlmain a bit.
get the window handle after window creation, skip the dx3 ddraw
initialisation and init d3d instead.> >> I agree with all of those, too, but Direct3D seems to have more

support “out of the box” than OpenGL. I want users to download a game

and be playing right away, without even knowing that they should
download the latest drivers for their videocard.
no! every user with win95 - winME has dx3 (5?) default and will need
to download the latest dx too. win2k / xp
has dx8 and will also need to download dx9 if you use it.

But at least I’d have some basic hardware accelerated functionality.
Right now, I don’t really need shaders or other fancy stuff.

So I believe
SDL + Direct3D is actually a useful combination.
why?
you would only use sdl for window creation and directinput. (i think
you would even have to create the window your
own to get the hWnd for d3d)

I use SDL extensively, mainly for the compositing engine and image
manipulation. True, I could use SDL just for this and roll my own
D3D/OpenGL code, and/or rewrite the SDL_Surface functionality and
eliminate the dependency to SDL completely, but for me it’s easier to
have D3D support in SDL.

Maybe my situation is unique and is not compatible with the intentions
of the SDL developers, but hey, I don’t lose anything by asking :slight_smile:

if you just need basic hw acceleration why don’t you stick with sdl?
on windows it uses dx3 to get hardware
support (as far as i know).

I want 3D hardware acceleration. OpenGL is the way to go, but I don’t
want to hassle my users by making them download the latest 3D drivers.

Lic. Gabriel Gambetta
ARTech - GeneXus Development Team
ggambett at artech.com.uy> ----- Original Message -----

From: Florian Hufsky [mailto:fhufsky@phorus.at]
Sent: Lunes, 18 de Agosto de 2003 12:26 p.m.
To: sdl at libsdl.org
Subject: Re: [SDL] SDL with Direct3D

if you just need basic hw acceleration why don’t you stick with sdl? on
windows it uses dx3 to get hardware support (as far as i know).

then your user won’t ever have to donwload new dx drivers and your app
would even run on win95 and NT (there’s no dx9 for this platforms)

anyway. i think you could use d3d if you change the code in sdlmain a
bit. get the window handle after window creation, skip the dx3 ddraw
initialisation and init d3d instead.

I agree with all of those, too, but Direct3D seems to have more
support “out of the box” than OpenGL. I want users to download a
game

and be playing right away, without even knowing that they should
download the latest drivers for their videocard.
no! every user with win95 - winME has dx3 (5?) default and will need
to download the latest dx too. win2k / xp
has dx8 and will also need to download dx9 if you use it.

But at least I’d have some basic hardware accelerated functionality.
Right now, I don’t really need shaders or other fancy stuff.

So I believe
SDL + Direct3D is actually a useful combination.
why?
you would only use sdl for window creation and directinput. (i think
you would even have to create the window your
own to get the hWnd for d3d)

I use SDL extensively, mainly for the compositing engine and image
manipulation. True, I could use SDL just for this and roll my own
D3D/OpenGL code, and/or rewrite the SDL_Surface functionality and
eliminate the dependency to SDL completely, but for me it’s easier to
have D3D support in SDL.

Maybe my situation is unique and is not compatible with the intentions

of the SDL developers, but hey, I don’t lose anything by asking :slight_smile:


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

Hiya Gabriel,

In windows XP, since microsoft wants to make directx seem fast and OpenGL
seem slow, theya ctualy ship the operating system with OpenGL drivers that
have been slowed down on purpose! So yeah, on that OS you deffinately would
want to download the latest drivers but im not sure you can blame OpenGL for
that.

OpenGL is a standard developed by SGI, a company that is the pinacle of
awesomeness in 3d graphics technology. Video cards are designed for use w/
OpenGL and D3D just uses the same hardware extensions but gives you their
crappy abstracted to hell interface to use it.

Easier and more portable, and works great out of the box (unless your on
XP!), trust us, go with OpenGL! You will be a happy camper (:> ----- Original Message -----

From: ggambett@artech.com.uy (Gabriel Gambetta)
To:
Sent: Monday, August 18, 2003 5:59 AM
Subject: RE: [SDL] SDL with Direct3D

I agree with all of these.
However, If you want to use DirectX, why use SDL?
You know that your game is running only in Windows
So, why do you use SDL and not Windows API which is a a little bit
faster?

Finally, If you have start learning DirectX lately, I suggest you give
it up and start learning OpenGL.

  • It is cross-platform
  • It is very easy to learn
  • DirectX is changing in every version (Microsoft sucks) but OpenGL is
    the same.
  • It is full hardware accellerated
  • It is faster than DirectX (I believe)

I agree with all of those, too, but Direct3D seems to have more support
"out of the box" than OpenGL. I want users to download a game and be
playing right away, without even knowing that they should download the
latest drivers for their videocard.

About the portability issue, I was going to write a Direct3D/OpenGL
abstraction layer and program everything on top of that. Because SDL
doesn’t support Direct3D, I’ll also have to rewrite most of the stuff
SDL is already doing for me when using it on top of OpenGL. So I believe
SDL + Direct3D is actually a useful combination.

Lic. Gabriel Gambetta
ARTech - GeneXus Development Team
ggambett at artech.com.uy


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

In windows XP, since microsoft wants to make directx seem fast and
OpenGL seem slow, theya ctualy ship
the operating system with OpenGL drivers that have been slowed down on
purpose! So yeah, on that OS you
deffinately would want to download the latest drivers but im not sure
you can blame OpenGL for that.

OpenGL is a standard developed by SGI, a company that is the pinacle
of awesomeness in 3d graphics technology.
Video cards are designed for use w/ OpenGL and D3D just uses the same
hardware extensions but gives you their
crappy abstracted to hell interface to use it.

Easier and more portable, and works great out of the box (unless your
on XP!), trust us, go with OpenGL! You will
be a happy camper (:

Don’t get me wrong. I love OpenGL. I don’t blame OpenGL for the driver
issues. I hate MS as much as you do. I don’t need to trust you to want
OpenGL, I already do.

But I’m trying to do shareware here. If it’s easier for users to have a
working Direct3D setup than an OpenGL setup, I really don’t have much of
a choice. No matter how much I prefer OpenGL and Linux, the market wants
Direct3D and Windows. Sad, but unavoidable :frowning:

Lic. Gabriel Gambetta
ARTech - GeneXus Development Team
ggambett at artech.com.uy

Hmm, i get ya, whats keepin you from doing OpenGL though? I wasnt aware
that there was any problem with OpenGL being available or running in windows
(besides the XP deal).

You realize OpenGL is the prevalent standard for 3d graphics in games, even
in windows right? Doom 3 will use OpenGL only and is the default setting
for many other games.

Before i used OpenGL i thought it had a very small slice of the graphics
pie, but it is actualy the largest slice.

I use OpenGL for the game im workin on cause its just available everywhere,
if you have a good reason why D3D is better in windows than OpenGL though,
my plan might be flawed (:> ----- Original Message -----

From: ggambett@artech.com.uy (Gabriel Gambetta)
To:
Sent: Monday, August 18, 2003 9:48 AM
Subject: RE: [SDL] SDL with Direct3D

In windows XP, since microsoft wants to make directx seem fast and
OpenGL seem slow, theya ctualy ship
the operating system with OpenGL drivers that have been slowed down on
purpose! So yeah, on that OS you
deffinately would want to download the latest drivers but im not sure
you can blame OpenGL for that.

OpenGL is a standard developed by SGI, a company that is the pinacle
of awesomeness in 3d graphics technology.
Video cards are designed for use w/ OpenGL and D3D just uses the same
hardware extensions but gives you their
crappy abstracted to hell interface to use it.

Easier and more portable, and works great out of the box (unless your
on XP!), trust us, go with OpenGL! You will
be a happy camper (:

Don’t get me wrong. I love OpenGL. I don’t blame OpenGL for the driver
issues. I hate MS as much as you do. I don’t need to trust you to want
OpenGL, I already do.

But I’m trying to do shareware here. If it’s easier for users to have a
working Direct3D setup than an OpenGL setup, I really don’t have much of
a choice. No matter how much I prefer OpenGL and Linux, the market wants
Direct3D and Windows. Sad, but unavoidable :frowning:

Lic. Gabriel Gambetta
ARTech - GeneXus Development Team
ggambett at artech.com.uy


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

In windows XP, since microsoft wants to make directx seem fast and
OpenGL seem slow, theya ctualy ship
the operating system with OpenGL drivers that have been
slowed down on
purpose! So yeah, on that OS you
deffinately would want to download the latest drivers but
im not sure
you can blame OpenGL for that.

OpenGL is a standard developed by SGI, a company that is the pinacle
of awesomeness in 3d graphics technology.
Video cards are designed for use w/ OpenGL and D3D just
uses the same
hardware extensions but gives you their
crappy abstracted to hell interface to use it.

Easier and more portable, and works great out of the box
(unless your
on XP!), trust us, go with OpenGL! You will
be a happy camper (:

Don’t get me wrong. I love OpenGL. I don’t blame OpenGL for
the driver issues. I hate MS as much as you do. I don’t need
to trust you to want OpenGL, I already do.

But I’m trying to do shareware here. If it’s easier for users
to have a working Direct3D setup than an OpenGL setup, I
really don’t have much of a choice. No matter how much I
prefer OpenGL and Linux, the market wants Direct3D and
Windows. Sad, but unavoidable :frowning:

No, it isn’t. The hardware vendor has to make drivers for OpenGL as well
as for DirectX. I dont know what hardware you are targeting, but every
graphic adapter vendor (NVIDIA, ATI, 3dLabs…) supports OpenGL for many
years. I dont have any problems with cards from that vendors.
I agree that some older cards (Intel, S3, Matrox) run much better under
DirectX than OpenGL, but their feature list is very short. They don’t
matter nowadays, i think.
Try to look from the other side: the more useable software is crying for
OpenGL support the more people will buy such cards and the better vendor
support for OpenGL will follow.
If you write software you are part of the market and you can guide it in
whatever direction you want.
To support DirectX (which has become very clean and nice to use) or
OpenGL (which is portable, clean and nice to use) is a question
regarding your religion. If you like OpenGL, use it!

Regards,
Jan

your user -won’t- have to download the latest oGL driver!
oGL is supported by windows out-of-the-box.

if you use d3d version >8 (2k, xp) or >5 (95-me) your user will have to
download the latest dx version.

but you can use whatever you like, this thread shouldn’t end up in a dx vs
ogl war.> ----- Original Message -----

From: ggambett@artech.com.uy (Gabriel Gambetta)
To:
Sent: Monday, August 18, 2003 5:47 PM
Subject: RE: [SDL] SDL with Direct3D

if you just need basic hw acceleration why don’t you stick with sdl?
on windows it uses dx3 to get hardware
support (as far as i know).

I want 3D hardware acceleration. OpenGL is the way to go, but I don’t
want to hassle my users by making them download the latest 3D drivers.

Lic. Gabriel Gambetta
ARTech - GeneXus Development Team
ggambett at artech.com.uy

-----Original Message-----
From: Florian Hufsky [mailto:@Florian_Hufsky]
Sent: Lunes, 18 de Agosto de 2003 12:26 p.m.
To: sdl at libsdl.org
Subject: Re: [SDL] SDL with Direct3D

if you just need basic hw acceleration why don’t you stick with sdl? on
windows it uses dx3 to get hardware support (as far as i know).

then your user won’t ever have to donwload new dx drivers and your app
would even run on win95 and NT (there’s no dx9 for this platforms)

anyway. i think you could use d3d if you change the code in sdlmain a
bit. get the window handle after window creation, skip the dx3 ddraw
initialisation and init d3d instead.

I agree with all of those, too, but Direct3D seems to have more
support “out of the box” than OpenGL. I want users to download a
game

and be playing right away, without even knowing that they should
download the latest drivers for their videocard.
no! every user with win95 - winME has dx3 (5?) default and will need
to download the latest dx too. win2k / xp
has dx8 and will also need to download dx9 if you use it.

But at least I’d have some basic hardware accelerated functionality.
Right now, I don’t really need shaders or other fancy stuff.

So I believe
SDL + Direct3D is actually a useful combination.
why?
you would only use sdl for window creation and directinput. (i think
you would even have to create the window your
own to get the hWnd for d3d)

I use SDL extensively, mainly for the compositing engine and image
manipulation. True, I could use SDL just for this and roll my own
D3D/OpenGL code, and/or rewrite the SDL_Surface functionality and
eliminate the dependency to SDL completely, but for me it’s easier to
have D3D support in SDL.

Maybe my situation is unique and is not compatible with the intentions

of the SDL developers, but hey, I don’t lose anything by asking :slight_smile:


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


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

To support DirectX (which has become very clean and nice to use) or
OpenGL (which is portable, clean and nice
to use) is a question regarding your religion. If you like OpenGL, use
it!

I still don’t think it’s that easy. When a clueless newbie user installs
Windows XP, it installs the hardware accelerated drivers Direct3D for
their video card. It doesn’t do the same thing for OpenGL.

It’s not a matter of whether I like OpenGL or not, which as I said, I
do. It’s a matter of how many customers will I lose because they install
the game and it doesn’t run hardware-accelerated out of the box. In
shareware, if the game doesn’t run perfectly after the user installed it
(by clicking Next, Next, Next), they won’t waste a single minute trying
to figure out what went wrong.

Most of them don’t even know what a driver is, or the difference between
OpenGL and Direct3D, or that OpenGL has a much cleaner and nicer API.
They don’t know and they don’t care. I don’t want to hope they read
the README file, understand what “download the latest OpenGL drivers for
your video card” means, or anything else. I just want it to work out of
the box.

Lic. Gabriel Gambetta
ARTech - GeneXus Development Team
ggambett at artech.com.uy

In windows XP, since microsoft wants to make directx seem fast and OpenGL
seem slow, theya ctualy ship the operating system with OpenGL drivers that
have been slowed down on purpose!

I am not a fan of MS, but unsubstantiated claims against them can do harm
to the cause of Linux and other decent OSs. Is there proof that MS has done
this with OpenGL? If so, where can I find it (URL or whatever reference)?

Thanks,
JOn Monday 18 August 2003 09:31 am, Atrix Wolfe wrote:

hmm…i first heard about it here on the list a couple months back (coulda
been longer though…), so not sure how accurate it is but it didnt surprise
me.

Maybe someone here knows where the first or second hand info on this is?> ----- Original Message -----

From: j_post@pacbell.net (Jeff Post)
To:
Sent: Monday, August 18, 2003 11:36 AM
Subject: Re: [SDL] SDL with Direct3D

On Monday 18 August 2003 09:31 am, Atrix Wolfe wrote:

In windows XP, since microsoft wants to make directx seem fast and
OpenGL

seem slow, theya ctualy ship the operating system with OpenGL drivers
that

have been slowed down on purpose!

I am not a fan of MS, but unsubstantiated claims against them can do
harm
to the cause of Linux and other decent OSs. Is there proof that MS has
done
this with OpenGL? If so, where can I find it (URL or whatever reference)?

Thanks,
J


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

In windows XP, since microsoft wants to make directx seem fast and
OpenGL seem slow, theya ctualy ship the operating system
with OpenGL
drivers that have been slowed down on purpose!

I am not a fan of MS, but unsubstantiated claims against
them can do harm
to the cause of Linux and other decent OSs. Is there proof
that MS has done
this with OpenGL? If so, where can I find it (URL or whatever
reference)?

Microsoft provides a standard OpenGL driver which implements a software
renderer, so it is quite slow, like MESA.
If you install your video card drivers what’s needed even when you are
planning using DirectX you will get the newest OpenGL drivers with the
same installation. So, no problem there.
Before we end up in a flame war between OpenGL/DirectX or
Microsoft/Opensource i would like to point you to the OpenGL homepage
(http://www.opengl.org). You can read some old threads regarding the
OGL/DX issue in the forums and get pretty good help with everything
related to OpenGL.

Let’s stop it now!

Regards,
Jan

your user -won’t- have to download the latest oGL driver!
oGL is supported by windows out-of-the-box.

true and false.
true, but it’s just the standard microsoft implementation using a
software renderer. to gain access to the hardware features, newest
extensions and pretty fast hardware accelerated rendering you will HAVE
TO install vendor specific drivers.
it’s like in linux. without the nvidia packages e.g. you will end up
using MESA. good luck!> if you use d3d version >8 (2k, xp) or >5 (95-me) your user

will have to download the latest dx version.

but you can use whatever you like, this thread shouldn’t end
up in a dx vs ogl war.

----- Original Message -----
From: “Gabriel Gambetta”
To:
Sent: Monday, August 18, 2003 5:47 PM
Subject: RE: [SDL] SDL with Direct3D

if you just need basic hw acceleration why don’t you
stick with sdl?
on windows it uses dx3 to get hardware

support (as far as i know).

I want 3D hardware acceleration. OpenGL is the way to go, but I
don’t want to hassle my users by making them download the latest 3D
drivers.

Lic. Gabriel Gambetta
ARTech - GeneXus Development Team
ggambett at artech.com.uy

-----Original Message-----
From: Florian Hufsky [mailto:fhufsky at phorus.at]
Sent: Lunes, 18 de Agosto de 2003 12:26 p.m.
To: sdl at libsdl.org
Subject: Re: [SDL] SDL with Direct3D

if you just need basic hw acceleration why don’t you stick
with sdl?
on windows it uses dx3 to get hardware support (as far as i know).

then your user won’t ever have to donwload new dx drivers
and your app
would even run on win95 and NT (there’s no dx9 for this platforms)

anyway. i think you could use d3d if you change the code in
sdlmain a
bit. get the window handle after window creation, skip the
dx3 ddraw
initialisation and init d3d instead.

I agree with all of those, too, but Direct3D seems to
have more

support “out of the box” than OpenGL. I want users to
download a

game

and be playing right away, without even knowing that
they should

download the latest drivers for their videocard.
no! every user with win95 - winME has dx3 (5?) default and will
need
to download the latest dx too. win2k / xp
has dx8 and will also need to download dx9 if you use it.

But at least I’d have some basic hardware accelerated
functionality.

Right now, I don’t really need shaders or other fancy stuff.

So I believe
SDL + Direct3D is actually a useful combination.
why?
you would only use sdl for window creation and directinput. (i
think
you would even have to create the window your
own to get the hWnd for d3d)

I use SDL extensively, mainly for the compositing engine
and image

manipulation. True, I could use SDL just for this and roll my own
D3D/OpenGL code, and/or rewrite the SDL_Surface functionality and
eliminate the dependency to SDL completely, but for me
it’s easier

to have D3D support in SDL.

Maybe my situation is unique and is not compatible with the
intentions

of the SDL developers, but hey, I don’t lose anything by asking :slight_smile:

Thanks for the info Jan!

I knew someone here knew what was up :P> ----- Original Message -----

From: tahoma@gmx.de (Jan Becker)
To:
Sent: Monday, August 18, 2003 12:49 PM
Subject: RE: [SDL] SDL with Direct3D

your user -won’t- have to download the latest oGL driver!
oGL is supported by windows out-of-the-box.

true and false.
true, but it’s just the standard microsoft implementation using a
software renderer. to gain access to the hardware features, newest
extensions and pretty fast hardware accelerated rendering you will HAVE
TO install vendor specific drivers.
it’s like in linux. without the nvidia packages e.g. you will end up
using MESA. good luck!

if you use d3d version >8 (2k, xp) or >5 (95-me) your user
will have to download the latest dx version.

but you can use whatever you like, this thread shouldn’t end
up in a dx vs ogl war.

----- Original Message -----
From: “Gabriel Gambetta”
To:
Sent: Monday, August 18, 2003 5:47 PM
Subject: RE: [SDL] SDL with Direct3D

if you just need basic hw acceleration why don’t you
stick with sdl?
on windows it uses dx3 to get hardware

support (as far as i know).

I want 3D hardware acceleration. OpenGL is the way to go, but I
don’t want to hassle my users by making them download the latest 3D
drivers.

Lic. Gabriel Gambetta
ARTech - GeneXus Development Team
ggambett at artech.com.uy

-----Original Message-----
From: Florian Hufsky [mailto:fhufsky at phorus.at]
Sent: Lunes, 18 de Agosto de 2003 12:26 p.m.
To: sdl at libsdl.org
Subject: Re: [SDL] SDL with Direct3D

if you just need basic hw acceleration why don’t you stick
with sdl?
on windows it uses dx3 to get hardware support (as far as i know).

then your user won’t ever have to donwload new dx drivers
and your app
would even run on win95 and NT (there’s no dx9 for this platforms)

anyway. i think you could use d3d if you change the code in
sdlmain a
bit. get the window handle after window creation, skip the
dx3 ddraw
initialisation and init d3d instead.

I agree with all of those, too, but Direct3D seems to
have more

support “out of the box” than OpenGL. I want users to
download a

game

and be playing right away, without even knowing that
they should

download the latest drivers for their videocard.
no! every user with win95 - winME has dx3 (5?) default and will
need
to download the latest dx too. win2k / xp
has dx8 and will also need to download dx9 if you use it.

But at least I’d have some basic hardware accelerated
functionality.

Right now, I don’t really need shaders or other fancy stuff.

So I believe
SDL + Direct3D is actually a useful combination.
why?
you would only use sdl for window creation and directinput. (i
think
you would even have to create the window your
own to get the hWnd for d3d)

I use SDL extensively, mainly for the compositing engine
and image

manipulation. True, I could use SDL just for this and roll my own
D3D/OpenGL code, and/or rewrite the SDL_Surface functionality and
eliminate the dependency to SDL completely, but for me
it’s easier

to have D3D support in SDL.

Maybe my situation is unique and is not compatible with the
intentions

of the SDL developers, but hey, I don’t lose anything by asking :slight_smile:


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

You can get access to the SDL window handle by using SDL_syswm.h
Take a look at the scrap demo for an example:
http://www.libsdl.org/projects/scrap/

See ya,
-Sam Lantinga, Software Engineer, Blizzard Entertainment