The future of SDL/directx

Well, the late developments WRT Vista seem to suggest that we’ll be
able to just use OpenGL on all platforms and be done with it. Very
good news!

However, there are a few 3D chipsets for which there are no OpenGL
drivers at all, and AFAIK, some versions of Windows required manual
installing of third party drivers for any OpenGL acceleration at all.
In current and previous versions of Windows, there seems to be no
real solution to that problem, short of proprietary wrappers.

Few enough remaining that you can just ignore them without losing
significant numbers of sales? I don’t know, but many in the indie
games community suggest that there are quite a few of these
problematic systems out there.

My impression is that, at this point, releasing a non-hardcore Win32
title that requires OpenGL, is asking for trouble.

//David Olofson - Programmer, Composer, Open Source Advocate

.------- http://olofson.net - Games, SDL examples -------.
| http://zeespace.net - 2.5D rendering engine |
| http://audiality.org - Music/audio engine |
| http://eel.olofson.net - Real time scripting |
'-- http://www.reologica.se - Rheology instrumentation --‘On Tuesday 21 March 2006 23:14, Lazy Foo’ wrote:

David Olofson <david olofson.net> writes:

If you’re running a machine that doesn’t support OpenGL, you’re
not a hardcore gamer.

Even the non-hardcore gamers will have enough OpenGL support. It’s
not like they’ll need the latest version of GLSL for glSDL.

David Olofson <david olofson.net> writes:

My impression is that, at this point, releasing a non-hardcore Win32
title that requires OpenGL, is asking for trouble.

You also have to remember that implementing a D3D backend basically doubles the
the amount of work into SDL’s graphics for windows. Is it really worth slowing
down SDL’s development for a few junk computers?

I say integrate glSDL and if there are any significant problems we’ll look into
implementing a D3D backend.

Until I see any reliable statistics into whether there’s a siginificant amount
of computers that can’t support OpenGL I honestly think it’s a waste of time
creating an entire second backend.

Until I see any reliable statistics into whether there’s a siginificant amount
of computers that can’t support OpenGL I honestly think it’s a waste of time
creating an entire second backend.

SDL is mostly just a collection of backends. One more doesn’t hurt. If
no one’s bitching about the aalib backend, I don’t think we need serious
statistics to write a backend for the way Microsoft recommends to get
bits to the screen on their platform in 2006.

–ryan.

SDL is mostly just a collection of backends. One more doesn’t hurt. If
no one’s bitching about the aalib backend, I don’t think we need serious
statistics to write a backend for the way Microsoft recommends to get
bits to the screen on their platform in 2006.

laugh

Now all we need is someone to step up and do it.

So… the windib driver seems to be more stable and work on a wide
variety of versions of Windows. Once we get a driver that uses the
latest snazzy DirectGraphics API, do we completely eliminate the
DirectDraw driver?

Also, I’d like to eliminate the hack that is OpenGL on windx5, if
possible, once the new driver is written. This will probably mean
reorganizing the windows driver into a unified one, with a single
window and event handling path, and then multiple sub-drivers for
the actual graphics output, depending on whether DirectGraphics is
available, and depending on whether OpenGL is requested.

Ugh…

-Sam Lantinga, Senior Software Engineer, Blizzard Entertainment

Hello !

Also, I’d like to eliminate the hack that is OpenGL on windx5, if
possible, once the new driver is written. This will probably mean
reorganizing the windows driver into a unified one, with a single window
and event handling path, and then multiple sub-drivers for the actual
graphics output, depending on whether DirectGraphics is available, and
depending on whether OpenGL is requested.

What do you mean with OpenGL on WinDX5 ? I thought
it would not be possible to use OpenGL with DirectX ?

CU

Ryan C. Gordon <icculus icculus.org> writes:

SDL is mostly just a collection of backends. One more doesn’t hurt. If
no one’s bitching about the aalib backend, I don’t think we need serious
statistics to write a backend for the way Microsoft recommends to get
bits to the screen on their platform in 2006.

–ryan.

Well it probably would help SDL gain a bigger userbase.

and it would be nice to select support with something like this:

if( OpenGL_Supported() )
{
SDL_SetVideoMode( SCREEN_WIDTH, SCREEN_HEIGHT, SCREEN_BPP, SDLGL_HWSURFACE );
}
else
{
SDL_SetVideoMode( SCREEN_WIDTH, SCREEN_HEIGHT, SCREEN_BPP, SDLD3D_HWSURFACE );
}

I’m just sick of OpenGL alarmists.

So… the windib driver seems to be more stable and work on a wide
variety of versions of Windows. Once we get a driver that uses the
latest snazzy DirectGraphics API, do we completely eliminate the
DirectDraw driver?

I think, yes, we probably should…as someone pointed out, DirectDraw is
already starting to rot in some drivers. WinDib or maybe glSDL will
cover the legacy people (Win95, WinNT, etc), and a Direct3D backend can
cover the rest.

As for your “ugh” comment: yeah, there’s going to be some nastiness in
the transition, without any doubt. But all this seems like the right
move to get through the next five years (!) of SDL.

–ryan.

David Olofson <david olofson.net> writes:

My impression is that, at this point, releasing a non-hardcore
Win32 title that requires OpenGL, is asking for trouble.

You also have to remember that implementing a D3D backend basically
doubles the the amount of work into SDL’s graphics for windows. Is
it really worth slowing down SDL’s development for a few junk
computers?

I frankly don’t know. Like I said, many indie developers suggest that
there are enough of these machines that ignoring them is a bad idea
if you’re trying to make money. But, like you, I’d like to see
reliable statistics before really acting on this.

I say integrate glSDL and if there are any significant problems
we’ll look into implementing a D3D backend.

Until I see any reliable statistics into whether there’s a
siginificant amount of computers that can’t support OpenGL I
honestly think it’s a waste of time creating an entire second
backend.

Of course. If I was really interested in D3D, I would have ported
glSDL long ago. As it is, I’m basically just hoping this D3D
“problem” will go away real soon, so I won’t have to do extra work
just to properly support a platform that I don’t really care for at
all.

//David Olofson - Programmer, Composer, Open Source Advocate

.------- http://olofson.net - Games, SDL examples -------.
| http://zeespace.net - 2.5D rendering engine |
| http://audiality.org - Music/audio engine |
| http://eel.olofson.net - Real time scripting |
'-- http://www.reologica.se - Rheology instrumentation --‘On Wednesday 22 March 2006 02:01, Lazy Foo’ wrote:

Well, it’s just that someone has to do the coding. :wink:

//David Olofson - Programmer, Composer, Open Source Advocate

.------- http://olofson.net - Games, SDL examples -------.
| http://zeespace.net - 2.5D rendering engine |
| http://audiality.org - Music/audio engine |
| http://eel.olofson.net - Real time scripting |
'-- http://www.reologica.se - Rheology instrumentation --'On Wednesday 22 March 2006 03:10, Ryan C. Gordon wrote:

Until I see any reliable statistics into whether there’s a
siginificant amount of computers that can’t support OpenGL I
honestly think it’s a waste of time creating an entire second
backend.

SDL is mostly just a collection of backends. One more doesn’t hurt.
If no one’s bitching about the aalib backend, I don’t think we need
serious statistics to write a backend for the way Microsoft
recommends to get bits to the screen on their platform in 2006.

David Olofson <david olofson.net> writes:

My impression is that, at this point, releasing a non-hardcore Win32
title that requires OpenGL, is asking for trouble.

Until I see any reliable statistics into whether there’s a siginificant amount
of computers that can’t support OpenGL I honestly think it’s a waste of time
creating an entire second backend.

Reflexive entertainment was forced to rewrite their game “Wik & the
Fable of Souls” because they could not rely on OpenGL drivers:
http://forums.indiegamer.com/showthread.php?t=810

“We found that GL drivers installed on most consumer machines weren’t
reliable enough and rewrote it to do all the effects in software.”

I think that if further work on SDL is based on the assumption that
OpenGL will be installed, commercial developers using SDL face quite a problem.

-Jesper Juul

But on the net you can read, that
on Vista you have to disable GLASS
to get OpenGL support. I don’t call the Vista
OpenGL Wrapper real OpenGL support.

This isn’t true as of a few days ago:

Kam VedBrat | Microsoft Learn

Looks like you’ll be able to do OpenGL 2.0 in a window on Vista, pixel
shaders and hardware acceleration and all, assuming your vendor (Nvidia,
ATI, etc) supply an updated driver, which they certainly will.

It’s interesting how quickly that changed. Now Microsoft’s “legacy” GL
renderer that’s layered over Direct3D means everyone (even crappy
on-board chips) will get a decent GL implementation, hardware
accelerated so long as you don’t need more than GL 1.4. Compared to what
you might end up with as a GL implementation for an on-board video chip
otherwise, this might actually be faster, more stable, and more
feature-complete, and takes pressure off the low-end vendors to deliver
anything other that D3D drivers. It also, more or less, guarantees that
you won’t land in a GL software renderer on Vista.

And the hardcore will still have Nvidia and ATI drivers.

From here, it sounds like this just became a huge win for OpenGL.

Damn right!

IMHO, what happened is that the original message from MS, that they were
dropping OpenGL support, was a combination of FUD and a trial balloon to
see how people would react. If there had been no strong reaction OpenGL
would have disappeared from Vista. But, there was a huge reaction. And
it wasn’t just from gamers.

A lot of the reaction came from the engineering workstation software
vendors and users. The engineering workstation market is a stronghold of
UNIX/Linux and acts as an entry point for UNIX/Linux into the
enterprise. It is also the market where large corporations are still
willing to pay many thousands of dollars per seat for hardware. It is a
market that MS wants very very badly. Most of the high dollar
engineering applications are written using OpenGL. So, MS decided to
support OpenGL in vista. That decision got such a great reaction that MS
decided to provide even better support for OpenGL.

You can say a lot of things about MS, but you can’t say they will do
something that will lock them out of an important market for software.

	Bob PendletonOn Tue, 2006-03-21 at 17:07 -0500, Ryan C. Gordon wrote:

–ryan.


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


±-------------------------------------+

Well the good thing about sdl is that you can choose whatever backend you
want.

If you say “oops, opengl is kaput!” you could just have it use windib then.

Or, if opengl support gets to the level it should be at, you could recompile
your code from windib to opengl and bam, you’d have way more fps.

I personally would like to see an opengl backend.

In the computer world, standards tend to have momentum I think. OpenGL had
great momentum and I think MS pulled a typical trick of trying to throw
their weight around and make a new standard. The more people that want and
use OpenGL, the better support there will be for it I think.

I love GL and would like to see it more prevalent so don’t mind the issues.

If you do mind the issues, you can just use a different backend, the GL
backend doesn’t even have to be the default one.> ----- Original Message -----

From: sdl-bounces+atrix2=cox.net@libsdl.org
[mailto:sdl-bounces+atrix2=cox.net at libsdl.org] On Behalf Of Jesper Juul /
Soup Games
Sent: Wednesday, March 22, 2006 3:54 AM
To: sdl at libsdl.org
Subject: Re: [SDL] the future of SDL/directx

David Olofson <david olofson.net> writes:

My impression is that, at this point, releasing a non-hardcore Win32
title that requires OpenGL, is asking for trouble.

Until I see any reliable statistics into whether there’s a siginificant
amount
of computers that can’t support OpenGL I honestly think it’s a waste of
time
creating an entire second backend.

Reflexive entertainment was forced to rewrite their game “Wik & the
Fable of Souls” because they could not rely on OpenGL drivers:
http://forums.indiegamer.com/showthread.php?t=810

“We found that GL drivers installed on most consumer machines weren’t
reliable enough and rewrote it to do all the effects in software.”

I think that if further work on SDL is based on the assumption that
OpenGL will be installed, commercial developers using SDL face quite a
problem.

-Jesper Juul


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

I think that if further work on SDL is based on the assumption that
OpenGL will be installed, commercial developers using SDL face quite a
problem.

Open source games, too. Many of our users with integrated/old graphics
chipsets don’t have the werewithall to update their drivers. Fortunately,
for the time being, they can drop back to software rendering and get
decent performance with the directx backend.

I don’t know whether the built-in software renderer in win 98-XP and glSDL
will offer as good performance as the current directx backend…or whether
a d3dSDL backend, should someone write one, would either.

What I’m hearing about Vista from you guys sounds fantastic, though. Intel
and VIA/S3 are more competent at writing D3D drivers, so the
OpenGL-through-D3D emulation would be a considerable improvement over what
we get now…if Microsoft does it well. I’ve gone from worried back to my
usual low level distrust that Microsoft will do it right, with a little
optimism reserved for if they do.

GregoryOn Wed, 22 Mar 2006, Jesper Juul / Soup Games wrote:

Le Tue, 21 Mar 2006 23:43:26 +0100
David Olofson a ?crit:

However, there are a few 3D chipsets for which there are no OpenGL
drivers at all, and AFAIK, some versions of Windows required manual
installing of third party drivers for any OpenGL acceleration at all.
In current and previous versions of Windows, there seems to be no
real solution to that problem, short of proprietary wrappers.

In Mesa, there is a Direct3D backend driver, but targetted for DirectX6
(so a bit old now), and has not been updated for a while:
http://www.mesa3d.org/RELNOTES-6.4.2

With it, it would provide the same ‘OpenGL on Direct3D’ as is planned
for Vista as default OpenGL implementation, for all win32 flavours.–
Patrice Mandin
WWW: http://pmandin.atari.org/
Programmeur Linux, Atari
Sp?cialit?: D?veloppement, jeux

Sam Lantinga wrote:

So… the windib driver seems to be more stable and work on a wide
variety of versions of Windows. Once we get a driver that uses the
latest snazzy DirectGraphics API, do we completely eliminate the
DirectDraw driver?

I rather like the idea of being able to run SDL apps on an old 486 with
no 3D capabilities running Windows 95 and getting 2D hardware
acceleration. (The windib driver provides no hardware acceleration and
therefore simply isn’t fast enough on such an old computer.)–
Rainer Deyke - rainerd at eldwood.com - http://eldwood.com

Well the good thing about sdl is that you can choose whatever backend you
want.

Speaking of this, is it supported (i.e. should I file bugs if it doesn’t
work) to quit the video subsystem, reset the video driver environment
variable, and restart the video subsystem? Or should I continue to advise
users to restart the app entirely?

GregoryOn Wed, 22 Mar 2006, Alan Wolfe wrote:

This is not an option if you’re using “high” resolutions and full
screen scrolling and/or lots of blending - and that sort of stuff
isn’t exactly “hardcore only” these days.

Actually, designing something that looks good (by modern standards)
and still scales down to pure software rendering basically means you
have to create two or more different implementations of the whole
product. It’s just not a realistic option, unless you live in some
dimension where the time/money relation is totally different from
what it is around here.

So, it’s either OpenGL, Direct3D (and possibly one or two other
backends that don’t exist on widely used platforms) - or total
failure!

Or, you can do what most indie developers do; use some BASIC dialect
or something, Direct3D, and forget about Mac OS, Linux and whatnot,
assuming that those platforms are next to insignificant anyway…

Seriously, if you actually want to create and sell games, that’s
probably the most sensible option, as it is. SDL lacking proper
support for the single most important API in this field doesn’t
exactly help changing that situation - and I think that’s a big
shame, considering that SDL, some real high level language, and
some Free/Open Source development tools could make a really great,
powerfull and affordable toolkit to compete with these proprietary,
non standards compliant, non-portable etc etc packages most people
are relying on.

//David Olofson - Programmer, Composer, Open Source Advocate

.------- http://olofson.net - Games, SDL examples -------.
| http://zeespace.net - 2.5D rendering engine |
| http://audiality.org - Music/audio engine |
| http://eel.olofson.net - Real time scripting |
'-- http://www.reologica.se - Rheology instrumentation --'On Wednesday 22 March 2006 22:06, Alan Wolfe wrote:

Well the good thing about sdl is that you can choose whatever
backend you want.

If you say “oops, opengl is kaput!” you could just have it use
windib then.

I know, but last thing I heard, it’s broken and out of sync with the
rest of the current code base. :-/

Would be a really nice thing to have though, as the (current) SDL 2D
isn’t really up to any more advanced accelerated rendering anyway -
and if I use OpenGL directly, a D3DSDL backend won’t help… (And, I
don’t want to use Direct3D directly in my application code, as my
development platform is Linux.)

//David Olofson - Programmer, Composer, Open Source Advocate

.------- http://olofson.net - Games, SDL examples -------.
| http://zeespace.net - 2.5D rendering engine |
| http://audiality.org - Music/audio engine |
| http://eel.olofson.net - Real time scripting |
'-- http://www.reologica.se - Rheology instrumentation --'On Wednesday 22 March 2006 22:20, Patrice Mandin wrote:

Le Tue, 21 Mar 2006 23:43:26 +0100
David Olofson <@David_Olofson> a ?crit:

However, there are a few 3D chipsets for which there are no OpenGL
drivers at all, and AFAIK, some versions of Windows required
manual installing of third party drivers for any OpenGL
acceleration at all.
In current and previous versions of Windows, there seems to be no
real solution to that problem, short of proprietary wrappers.

In Mesa, there is a Direct3D backend driver, but targetted for
DirectX6 (so a bit old now), and has not been updated for a while:
http://www.mesa3d.org/RELNOTES-6.4.2

Heya.

I was reading through my backlog of messages on the SDL mailing list and
I came across some messages regarding Direct3D in SDL. If anyone is
interested, I have a working prototype of a Direct3D backend. It’s far
from finished, and uses Direct3D 9 where something like Direct3D 7 (or
earlier) would probably be a better choice, but it is capable of
displaying and accelerating 32-bit alpha-blended images. If anyone is
interested in a copy of this code, let me know and I can send them a copy.–
David Ludwig
davidl at funkitron.com

Ryan C. Gordon wrote:

I agree with Stephane: especially now that glSDL is definitely going in,
it only makes sense to add a d3dSDL. There is no DirectDraw anymore, so
matching what glSDL does with Direct3D is both the fastpath and most
future-proof way to handle 2D rendering on Windows.

Granted, this will start a long thread of emails asking us to add a
SDL_DIRECT3D flag to SDL_SetVideoMode to match SDL_OPENGL…

Hello !

I was reading through my backlog of messages on the SDL mailing list and
I came across some messages regarding Direct3D in SDL. If anyone is
interested, I have a working prototype of a Direct3D backend. It’s far
from finished, and uses Direct3D 9 where something like Direct3D 7 (or
earlier) would probably be a better choice, but it is capable of
displaying and accelerating 32-bit alpha-blended images. If anyone is
interested in a copy of this code, let me know and I can send them a
copy.

Cool. Please upload it somewhere
and post the link here.

CU