Proposal: Drop support for software rendering in 1.3

You apparently missed the bit about “or broken hardware acceleration”.

Depending upon Rainer’s definition of broken, I’d have to concur that
such systems are common. Or at the very least, not uncommon.On Mon, Jan 24, 2011 at 16:38, Mason Wheeler wrote:

No such computer has been sold since the 90s on any platform that SDL
supports. ?Seems to me you’ve got a very odd definition of “common”.
How many people are still running on 90s-era video cards today?

----- Original Message ----
From: Rainer Deyke
Subject: Re: [SDL] Proposal: Drop support for software rendering in 1.3

On 1/24/2011 12:24, Mason Wheeler wrote:

I probably should have named this differently when I started the thread. ?In my

original post I pointed out that there’s a good reason to keep the software
renderer. ?What I wanted to drop was the software-based (non-accelerated)
system-specific rendering backends such as X11 and GDI, and I think most people

here can agree that that is a good idea, right?

Absolutely not. ?Like I said, I don’t care about renderers so long as I
can get a simple frame buffer. ?I do care about getting that simple
frame buffer even on computers with no hardware acceleration, because
computers with no hardware acceleration or broken hardware acceleration
are still common.


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


Do what you can, where you are, with what you have. - T. Roosevelt

So I vote NO to remove the software renderer from SDL, but I think
there is room to improve the Renderer APIs, with rotation functions
and a texture to texture blit function for instance. With software
fallback if the operations cannot be done by HW…

I second that.

The company I’m currently contracting for uses machines with fairly
up-to-date CPUs with decent clock speed and amount of RAM but they all
use the default video chip on the motherboard. No 3D or acceleration
or anything at all. VGA, that’s what it is.

SDL is used for things other than games. Not everything needs fantastic
performance but many applications need adequate performance and the
user could not care less whether it is done in SW or on a GPU. More
importantly, the user does not want to care whether (s)he has a GPU or
not.

Furthermore, SDL is used in all sorts of devices, not just PCs and
mobile platforms. Think of cheap ARM9 chips. Most of them have an
on-board frame buffer and LCD drivers as well as an I2S interface. You
stick some FLASH/SDRAM, a decent sized TFT panel and a codec chip to
them, load Linux, SDL on a frame buffer and lo and behold, you have a
decent multimedia capable device, small, low power and cheap.

So I do believe that the SW renderer is a very important feature and
should be kept.

Zoltan

Looks like you missed the whole discussion about broken and missing drivers.On 1/24/2011 15:38, Mason Wheeler wrote:

No such computer has been sold since the 90s on any platform that SDL
supports. Seems to me you’ve got a very odd definition of “common”.
How many people are still running on 90s-era video cards today?


Rainer Deyke - rainerd at eldwood.com

No, I just don’t believe it’s nearly as big a problem as you’re making it out
to be.>----- Original Message ----

From: Rainer Deyke
Subject: Re: [SDL] Proposal: Drop support for software rendering in 1.3

On 1/24/2011 15:38, Mason Wheeler wrote:

No such computer has been sold since the 90s on any platform that SDL
supports. Seems to me you’ve got a very odd definition of “common”.
How many people are still running on 90s-era video cards today?

Looks like you missed the whole discussion about broken and missing drivers.

michelleC wrote:

don’t think that the types of applications written for iOS and Android really need to worry too much about the memory limitation – I don’t think I’ve EVER exceed 40mb of memory in any of my PC programs; and if I were to optimize knowing I’m going to a low-memory system, I could probably cut it notably more (storing rarely accessed data in a file or compressing it in memory, always making sure I’m using the minimum sized types possible, stuff like this is fairly easy to do, requires simple code changes, and can save big on memory).

you are either :

  1. joking
  2. don’t have the foggiest notion of IOS and especially android native programming
  3. not really done anything other than simple to-do lists or games.

I’ve never done anything but 2D games, so maybe 3D games are bigger. Still, to exceed 100MB (of RAM, not disk) for a single program seems just ridiculous to me.------------------------
EM3 Nathaniel Fries, U.S. Navy

http://natefries.net/

Thank you. Please keep it for all currently supported backends.

Just to throw in my 2 cents worth, lately there have been a number of postings
on this thread that display what I can only see as an elitist attitude about
certain platforms. Not everyone has or wants the latest high-end hardware.
Anyone who thinks otherwise should get off their high horse and re-evaluate
their view of reality.

I like, and I do mean really like the philosophy behind SDL, emphasis on the
SIMPLE part. For the work I do with SDL, if X11 isn’t supported then SDL,
despite its advantages, becomes useless to me. I really don’t want to have to
deal with the complexity of QT or GTK, and I seriously doubt that I’m alone
in this.

If it matters, I don’t use SDL to develop games. I use it (mostly) to write
mathematical applications for my students and the faculty where I teach.
Those applications must run on Linux, Macs, and Windows.

So I could just stick with SDL 1.2, right? Except that 1.3 has features that
I’d really like to use. Please keep software rendering support for all
backends supported in 1.2.

(Besides, people with elitist attitudes piss me off :wink:

Thanks,
JeffOn Monday 24 January 2011 11:15, Sam Lantinga wrote:

Yep, we’re keeping the software renderer. :slight_smile:

Yep, we’re keeping the software renderer. :slight_smile:

Thank you. Please keep it for all currently supported backends.

Just to throw in my 2 cents worth, lately there have been a number of postings
on this thread that display what I can only see as an elitist attitude about
certain platforms. Not everyone has or wants the latest high-end hardware.
Anyone who thinks otherwise should get off their high horse and re-evaluate
their view of reality.

Elitist? My entire point throughout is that the “latest high-end hardware”
argument no longer applies. Hardware-accelerated 3D rendering hasn’t been
“lastest high-end” for a long time now. What part of freaking “standard feature
everywhere for over a decade” do so many people not get?!? This is driving
me nuts!>----- Original Message ----

From: Jeff Post <j_post at pacbell.net>
Subject: Re: [SDL] Proposal: Drop support for software rendering in 1.3
On Monday 24 January 2011 11:15, Sam Lantinga wrote:

What part of freaking “standard feature
everywhere for over a decade” do so many people not get?!?

hmm. and here I’m using an OS that has had SDL packages for 10 years,
but only got hardware 3D rendering in the last year or so. and only
for Intel and ATI.On Mon, Jan 24, 2011 at 10:09:15PM -0800, Mason Wheeler wrote:


@Jacob_Meuser
SDF Public Access UNIX System - http://sdf.lonestar.org

Yep, we’re keeping the software renderer. :slight_smile:

Thank you. Please keep it for all currently supported backends.

Just to throw in my 2 cents worth, lately there have been a number of postings
on this thread that display what I can only see as an elitist attitude about
certain platforms. Not everyone has or wants the latest high-end hardware.
Anyone who thinks otherwise should get off their high horse and re-evaluate
their view of reality.

Elitist? My entire point throughout is that the “latest high-end hardware”
argument no longer applies. Hardware-accelerated 3D rendering hasn’t been
“lastest high-end” for a long time now. What part of freaking “standard feature
everywhere for over a decade” do so many people not get?!? This is driving
me nuts!

Because it’s not a “standard feature everywhere for over a decade” like you insist it is.

Hardware shipped as late as late last year has some very poor 3D drivers on Windows.

And have you looked at how poor most open source 3D drivers are on Linux?

-ShawnOn Jan 24, 2011, at 10:09 PM, Mason Wheeler wrote:

----- Original Message ----
From: Jeff Post <j_post at pacbell.net>
Subject: Re: [SDL] Proposal: Drop support for software rendering in 1.3
On Monday 24 January 2011 11:15, Sam Lantinga wrote:

Hi,

Unlike, dropping GDI, and X11.

If SDL is going to drop those, then I’m sure there’ll be a fork. There’s
plenty of need, and want for this feature - which I think is the main
advantage of SDL compared to other libraries.On Mon, Jan 24, 2011 at 9:11 PM, Sam Lantinga wrote:

Yep. :slight_smile:

On Mon, Jan 24, 2011 at 11:24 AM, Mason Wheeler wrote:

I probably should have named this differently when I started the thread.
In my original post I pointed out that there’s a good reason to keep the
software renderer. What I wanted to drop was the software-based
(non-accelerated) system-specific rendering backends such as X11 and GDI,
and I think most people here can agree that that is a good idea, right?

Mason

Elitist? My entire point throughout is that the “latest high-end hardware”
argument no longer applies. Hardware-accelerated 3D rendering hasn’t been
“lastest high-end” for a long time now. What part of freaking “standard
feature
everywhere for over a decade” do so many people not get?!? This is driving
me nuts!

Let’s give you an example:

In my office we don’t develop games, we have a team of maybe 20 engineers
and no one, except me, care about having hardware accelerated graphics in
his linux desktop. Most ppl use the same destkop from 5/7 years and it’s
equipped with Radeon 9200, Matrox or intel gma gfx cards and the stock (open
source) drivers provided by linux distros usually do not support 3d
acceleration on these chipsets.

SDL 1.3 offers multiple windows, this is a nice feature useful only for non
gaming software, I often missed it in the recent years, that has been a WALL
that prevented the use of SDL in a few (small) projects.

I’ve never had this problem with hardware acceleration, SDL 1.2, with the
X11 renderer was fast enough for our video analysis, GDI was OK for the
windows version, in a few projects we had also to disable YUV OVERLAY
acceleration cause it caused issues on some target win32 systems…–
Ing. Gabriele Greco, DARTS Engineering
Tel: +39-0105761240 Fax: +39-0105760224
s-mail: Via G.T. Invrea 14 - 16129 GENOVA (ITALY)

Elitist? My entire point throughout is that the “latest high-end
hardware”
argument no longer applies. Hardware-accelerated 3D rendering hasn’t been
“lastest high-end” for a long time now. What part of freaking “standard
feature
everywhere for over a decade” do so many people not get?!? This is
driving
me nuts!

Let’s give you an example:

In my office we don’t develop games, we have a team of maybe 20 engineers
and no one, except me, care about having hardware accelerated graphics in
his linux desktop. Most ppl use the same destkop from 5/7 years and it’s
equipped with Radeon 9200, Matrox or intel gma gfx cards and the stock (open
source) drivers provided by linux distros usually do not support 3d
acceleration on these chipsets.

SDL 1.3 offers multiple windows, this is a nice feature useful only for non
gaming software, I often missed it in the recent years, that has been a WALL
that prevented the use of SDL in a few (small) projects.

I’ve never had this problem with hardware acceleration, SDL 1.2, with the
X11 renderer was fast enough for our video analysis, GDI was OK for the
windows version, in a few projects we had also to disable YUV OVERLAY
acceleration cause it caused issues on some target win32 systems…

It’s not only 5-7 year old hardware either. OLPC laptops for example do not
have OpenGL.

cheers,On Tue, Jan 25, 2011 at 4:17 PM, Gabriele Greco <gabriele.greco at darts.it>wrote:

Elitist? My entire point throughout is that the “latest high-end
hardware” argument no longer applies. Hardware-accelerated 3D rendering
hasn’t been “lastest high-end” for a long time now. What part of
freaking “standard feature
everywhere for over a decade” do so many people not get?!? This is
driving me nuts!

Let’s give you an example:

In my office we don’t develop games, we have a team of maybe 20 engineers
and no one, except me, care about having hardware accelerated graphics in
his linux desktop. Most ppl use the same destkop from 5/7 years and it’s
equipped with Radeon 9200, Matrox or intel gma gfx cards and the stock
(open source) drivers provided by linux distros usually do not support 3d
acceleration on these chipsets.

…and if SDL was to drop the X11 backend, what would one use if there is no
accelerated OpenGL available? Mesa software might be installed, but it’s
practically useless for anything but off-line rendering anyway.

SDL 1.3 offers multiple windows, this is a nice feature useful only for non
gaming software, I often missed it in the recent years, that has been a
WALL that prevented the use of SDL in a few (small) projects.

+1

I have all sorts of code, including GUI toolkits, rendering via SDL and/or
OpenGL. It’s handy to have a set of libs that play nice together, but being
restricted to a single window is a problem, and depending on 3D acceleration
to run at all would probably be a showstopper for anything but inhouse tools.

As to the 3D accelerated stuff, I’m still not quite sure where I’m going with
that. My current project (Kobo II) is “native” OpenGL. Although it’s all 2D,
it uses polygons, scaling, rotation and blending - which apparently puts it
outside the scope of the SDL 1.3 rendering API.

I’m considering adding Direct3D support, but I’m deeply annoyed by the fact
that there shouldn’t be a need for it, and that I’ll have to debug it on an
annoying OS that I normally use only for the occasional gaming session.

Another application for that universal 2D/3D API that everyone wants, but no
one ever gets around to implement. :-)On Tuesday 25 January 2011, at 17.17.27, Gabriele Greco <gabriele.greco at darts.it> wrote:


//David Olofson - Consultant, Developer, Artist, Open Source Advocate

.— Games, examples, libraries, scripting, sound, music, graphics —.
| http://consulting.olofson.net http://olofsonarcade.com |
‘---------------------------------------------------------------------’

No such computer has been sold since the 90s on any platform that SDL
supports. Seems to me you’ve got a very odd definition of “common”.
How many people are still running on 90s-era video cards today?

Yes, there are many computers sold even today which have no HW
accelarting video card. Companies are not willing to fork out almost as
much as the price of the motherboard to get the latest whizz-bang 3D
card if they do not naturally work with 3D. They take the primitive
video chip on the motherboard and buy no video card whatsoever.

On top of that, there are the embedded systems, most of which are a
simple framebuffer device. Neither the cost nor the power budget would
allow a GPU to be there.

SDL supports anything with a framebuffer and some POSIX-ish OS. Such
az the SoC core with a TFT panel, running Linux.

ZoltanOn Mon, 24 Jan 2011 14:38:07 -0800 (PST) Mason Wheeler wrote:

Regardless of what is thought, Sam has made the decision to keep the software renderer and all other backends, and after talking to him privately about it and reading all the responses here; I’m forced to agree with him.

It’s likely that SDL will lose more users over removal of the software renderer and X11/GDI backends than it would gain from addition of the features that these backends are preventing.
There are a few algorithms for rotating an SDL_Surface already. Generally in 2D games you already know the possible angles of rotation. So make it happen using those if it’s absolutely needed.
The software and GDI backends doesn’t inhibit the functionality of render targets/buffers. In fact, older versions of OpenGL are more preventative. Dunno about the X11 rendering backend.------------------------
EM3 Nathaniel Fries, U.S. Navy

http://natefries.net/

  1. ATI / AMD has released some information about some cards, but maybe not enough
    to really get a complete driver going for their cards.

That’s simply not true. ?ATi / AMD has released thousands of pages of specifications, microcode for almost all Radeon GPUs, tens of thousands of lines of sample source code, and more.

The reality is that writing drivers is hard work, and writing accelerated 2D/3D drivers is even harder.

It’s not something that the casual hacker can accomplish quickly, and it takes years of dedication, specialized knowledge, and (realistically) significant financial sponsorship.

Let me second that! The times I’ve done that kind of work the teams
had more than a dozen people, working more than full time, the and an
average of an MS in CS or EE or Math and and average of about 10 years
of experience. Given all that a driver for a greenfield design took as
long or longer than the the hardware design. Always measured in years.

Bob PendletonOn Sat, Jan 22, 2011 at 12:33 AM, Shawn Walker wrote:

On Jan 21, 2011, at 8:44 PM, Torsten Giebl wrote:

-Shawn


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


±----------------------------------------------------------

Sam, drop software rendering. Just drop it. It is obsolete now and
will be positively archaic by next year. Moore’s law demands that GPU
cores be moved onto the CPU chip in huge numbers.

BTW, the guy who commented about bad drivers for ancient slow GPUs is
way out of line. If hardware graphics is slow on that kind of machine
then software graphics will be even slower.

Ok, back to your question about the rendering API. There is a need
conceptually simple graphics API that can be used be used and
understood by everyone. If the rendering API was expanded to included
3D then it would be loved by all. The best thing about the rendering
API is that it is always there and will should use whatever hardware
support is available, whether that is OpenGL or DirectX, or whatever
the rendering API can be a high performance, limited, simple, graphics
API that just works with OpenGL.

If I were doing it I would have a nice part of SDL analyze the
hardware and pick the “best” or at least “good enough” depth for the
screen buffers, textures, and images. Provide functions to convert to
and from images to the default format and then hide what is really
there as much as possible. The default would be an rgba buffer on all
platforms, it might be an 8888 format, or a 2222 format or whatever
but it would be RGBA. (OK, it could be ARGB but we would hide that so
the programmer doesn’t care!) You could ask for a depth buffer, a
stencil buffer, and all the other buffers. You might not get them, but
if you do they will be like the image buffers, the best or at least
good enough, that you can get on the hardware you have. There would be
no hardware pixel formats visible to the at any time.

Yeah, a lot of folks will hate that idea, but it actually works and
allows for a doable cross platform implementation.

Ok, I have a lot of opinions on this subject, but my wife just said
that dinner is ready!

Bob PendletonOn Fri, Jan 21, 2011 at 3:34 AM, Sam Lantinga wrote:

I’m curious, would people rather see the rendering API go away?

Does it increase the complexity of the API without bringing enough
functionality to be useful?

On Fri, Jan 21, 2011 at 12:39 AM, Sam Lantinga wrote:

I’ve thought a lot about this, and here’s my thoughts…

SDL serves three types of video API users:

  1. People who just want a framebuffer and use SDL 1.2 blit and direct
    pixel access to do the job.
  2. People who just want an OpenGL context, and use OpenGL or OpenGL ES to
    do the job.
  3. People who want a hardware accelerated 2D API

For #1 and #2, the functionality was available in SDL 1.2 and the feature
set is well understood.

For #3, this is a new area that SDL 1.3 is supporting, and it’s really
easy to lose the “Simple” in “Simple DirectMedia Layer”

So I think here is a good time to remember that the goal of the SDL
rendering API is simply to hardware accelerate operations that were
typically done with the SDL 1.2 API.

This is tricky, since people did lots of interesting things with direct
framebuffer access, but let me break it down into a feature set:

copying images
filling rectangles
drawing single pixel lines
drawing single pixel points

SDL 1.2 provided colorkey, alpha channels, and per-surface alpha, as well
as nearest pixel scaling.

Again, to break that down into a feature set:

blending for all operations
single vertex alpha for all operations
single vertex color for all operations
scaling for image copy operations

It’s tempting to add functionality here, but that road lies madness.

Right now SDL provides renderers with varying levels of functionality, and
the API user has to query renderers and capabilities and so forth.

Again, in the interest of simplicity, I will be pulling out the partially
functional renderers, and requiring all renderers to be fully functional.

This leaves the following renderers, availability depending on platform:

  • software (always available, blasting pixels through the 1.2 interfaces)
  • Direct3D
  • OpenGL
  • OpenGL ES

See ya!

On Thu, Jan 20, 2011 at 2:41 PM, Mason Wheeler wrote:

After some discussion on the “Again Rotozoom” thread, I figure I may as
well
formally raise this proposal:

Because all platforms that SDL supports have hardware-accelerated video
available as a standard feature, and because this has been true for over
a
decade, (7+ Moore cycles,) and because of the difficulty of implementing
several
advanced features in a performant manner in software, I propose that SDL
1.3
should drop support for non-accelerated backends such as GDI and X11 and
focus
on modern, hardware-accelerated APIs such as OpenGl, GLES and Direct3D.

Seb Da Rocha brought up an interesting point: the SDL software renderer
is
generic and implemented entirely within SDL instead of relying on an API
backend
to crunch the pixels. ?As such, it could be retained as a reference
implementation (“this is what correct rendering is supposed to look
like”) for
people implementing SDL on new platforms, but it should be made clear
that it’s
only for use as a reference implementation and not supposed to be used to
actually build games with.

Can everyone agree on this?

Mason


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


? ? -Sam Lantinga, Founder and President, Galaxy Gameworks LLC


? ? -Sam Lantinga, Founder and President, Galaxy Gameworks LLC


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


±----------------------------------------------------------

BTW, the guy who commented about bad drivers for ancient slow GPUs is
way out of line. If hardware graphics is slow on that kind of machine
then software graphics will be even slower.

Though personally I’m not entirely opposed to dropping software
rendering in 1.3, I can certainly understand the desire for the
software rendering fallback.

It’s not necessarily a question of speed. It’s often a question of
working properly at all.

There are plenty of developers who would like to have a fallback
option if the hardware drivers are broken or even just not installed.
Granted, often it makes more sense to just bail, but, for some
applications like educational applications, analytic visualization and
even casual games, it is perfectly viable to fall back to software
rendering.

It might be necessary to also limit the quality of the rendering in
that case, of course.

All that being said, if SDL keeps to a sufficiently simple set of
operations, it’s likely that the vast majority of applications will be
able to run successfully even on GMA-950 (the current primary
candidate for bottom of the barrel status).

Some of your other ideas sound interesting, though I tend to swing
toward the opposite end of the spectrum - rather than have SDL hide
everything from me, I think I’d rather have it expose everything to
me, so I can decide what to use, and what features to avoid, and how
best to optimize for a given platform.

A layer could be built on top of SDL to give the behavior you’re espousing.

It’s really just a difference of opinion on what the “Simple” in SDL
should mean. Conservation of Complexity dictates that there will be
complexity somewhere in the system, it’s just a matter of where we
put it.

The API’s implementation can be simple, but then the layers above will
likely need to do more work. That has the advantage of enabling an
intermediate layer that does most or all of that work to expose an
even simpler model to the application, whist retaining both simplicity
in the SDL layer (to ease porting) and giving more flexibility to the
apps built on top of SDL.

The alternative is to do as you suggest, and push the complexity down
into SDL itself. That would remove a layer in the case where an
application doesn’t need the simplicity, but would make things more
complex (or impossible) in the cases where the application needs more
flexibility.

I submit that the former style more closely fits with the design of
SDL up to this point. SDL itself is simple, but limited and/or low
level. Then there are libraries such as SDL_mixer, SDL_image, SDL_ttf,
etc., to extend and/or simplify specific tasks. One could imagine the
addition of SDL_render or some such, that exposes an simplified model
in the way you describe.On Mon, Jan 31, 2011 at 19:08, Bob Pendleton wrote:

Ok, back to your question about the rendering API. There is a need
conceptually simple graphics API that can be used be used and
understood by everyone. If the rendering API was expanded to included
3D then it would be loved by all. The best thing about the rendering
API is that it is always there and will should use whatever hardware
support is available, whether that is OpenGL or DirectX, or whatever
the rendering API can be a high performance, limited, simple, graphics
API that just works with OpenGL.

If I were doing it I would have a nice part of SDL analyze the
hardware and pick the “best” or at least “good enough” depth for the
screen buffers, textures, and images. Provide functions to convert to
and from images to the default format and then hide what is really
there as much as possible. The default would be an rgba buffer on all
platforms, it might be an 8888 format, or a 2222 format or whatever
but it would be RGBA. (OK, it could be ARGB but we would hide that so
the programmer doesn’t care!) ?You could ask for a depth buffer, a
stencil buffer, and all the other buffers. You might not get them, but
if you do they will ?be like the image buffers, the best or at least
good enough, that you can get on the hardware you have. There would be
no hardware pixel formats visible to the at any time.

Yeah, a lot of folks will hate that idea, but it actually works and
allows for a doable cross platform implementation.

Ok, I have a lot of opinions on this subject, but my wife just said
that dinner is ready!

Bob Pendleton

On Fri, Jan 21, 2011 at 3:34 AM, Sam Lantinga wrote:

I’m curious, would people rather see the rendering API go away?

Does it increase the complexity of the API without bringing enough
functionality to be useful?

On Fri, Jan 21, 2011 at 12:39 AM, Sam Lantinga wrote:

I’ve thought a lot about this, and here’s my thoughts…

SDL serves three types of video API users:

  1. People who just want a framebuffer and use SDL 1.2 blit and direct
    pixel access to do the job.
  2. People who just want an OpenGL context, and use OpenGL or OpenGL ES to
    do the job.
  3. People who want a hardware accelerated 2D API

For #1 and #2, the functionality was available in SDL 1.2 and the feature
set is well understood.

For #3, this is a new area that SDL 1.3 is supporting, and it’s really
easy to lose the “Simple” in “Simple DirectMedia Layer”

So I think here is a good time to remember that the goal of the SDL
rendering API is simply to hardware accelerate operations that were
typically done with the SDL 1.2 API.

This is tricky, since people did lots of interesting things with direct
framebuffer access, but let me break it down into a feature set:

copying images
filling rectangles
drawing single pixel lines
drawing single pixel points

SDL 1.2 provided colorkey, alpha channels, and per-surface alpha, as well
as nearest pixel scaling.

Again, to break that down into a feature set:

blending for all operations
single vertex alpha for all operations
single vertex color for all operations
scaling for image copy operations

It’s tempting to add functionality here, but that road lies madness.

Right now SDL provides renderers with varying levels of functionality, and
the API user has to query renderers and capabilities and so forth.

Again, in the interest of simplicity, I will be pulling out the partially
functional renderers, and requiring all renderers to be fully functional.

This leaves the following renderers, availability depending on platform:

  • software (always available, blasting pixels through the 1.2 interfaces)
  • Direct3D
  • OpenGL
  • OpenGL ES

See ya!

On Thu, Jan 20, 2011 at 2:41 PM, Mason Wheeler wrote:

After some discussion on the “Again Rotozoom” thread, I figure I may as
well
formally raise this proposal:

Because all platforms that SDL supports have hardware-accelerated video
available as a standard feature, and because this has been true for over
a
decade, (7+ Moore cycles,) and because of the difficulty of implementing
several
advanced features in a performant manner in software, I propose that SDL
1.3
should drop support for non-accelerated backends such as GDI and X11 and
focus
on modern, hardware-accelerated APIs such as OpenGl, GLES and Direct3D.

Seb Da Rocha brought up an interesting point: the SDL software renderer
is
generic and implemented entirely within SDL instead of relying on an API
backend
to crunch the pixels. ?As such, it could be retained as a reference
implementation (“this is what correct rendering is supposed to look
like”) for
people implementing SDL on new platforms, but it should be made clear
that it’s
only for use as a reference implementation and not supposed to be used to
actually build games with.

Can everyone agree on this?

Mason


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


? ? -Sam Lantinga, Founder and President, Galaxy Gameworks LLC


? ? -Sam Lantinga, Founder and President, Galaxy Gameworks LLC


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


±----------------------------------------------------------


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


Do what you can, where you are, with what you have. - T. Roosevelt

[…]

There are plenty of developers who would like to have a fallback
option if the hardware drivers are broken or even just not installed.
Granted, often it makes more sense to just bail, but, for some
applications like educational applications, analytic visualization and
even casual games, it is perfectly viable to fall back to software
rendering.

This is what I’ve been thinking as well, but I think it basically comes down
to this: You either use “2D over 3D” style rendering, or you don’t. It’s kind
of ridiculous to demand hardware acceleration, and then do nothing but plain
rectangular blits. (For this reason, it seems rather strange to me to restrict
the SDL 1.3 API to rectangular operations and no rotation or arbitrary
polygons.)

Sure, you may want to run a pure 2D game in high resolution on platforms where
2D APIs are not accelerated, and software rendering is severely penalized by
the hardware. That’s what glSDL was all about; a “bolt on” performance hack
for code that would still run fine with standard SDL. It was never intended to
be used as an OpenGL wrapper for applications that can’t run without 3D
acceleration.

With the current state of things, I’m having a hard time seeing why one would
design a new game to run within the limitations of a “pure 2D” API - and if it
still requires OpenGL or Direct3D to run, it’s just ridiculous…!

Even cell phones have 3D accelerators already, and with 3D acceleration based
desktop environments becoming standard, I think actual 2D rendering is
becoming a niche thing for extremely low end hardware.

Heck, even the dashboard computer in my race car has 3D hardware! Sure, it’s
low end Intel crap, and I never even got the Linux drivers to work on it - but
hey, that hardware is a few years old already! :slight_smile:

That said, I do see the usefullness of having a software implementation of the
API - even a dog slow one. I could really use that for some of my projects
(the EEL GUI toolkit, in particular), but I’m not sure it belongs in SDL 1.3.
It’s a lot of work to get right, especially if it’s going to cover blending,
transforms and all that - and I think it has to, for there to be any point in
pretending it’s a “real” SDL backend.

One idea that just crossed my mind: Strip down the 2D backends to a bare
minimum; a subset of the SDL 1.2 video API, offering little more than frame
buffer access. That way, you can still use input, audio and all the other
handy stuff, and use a suitable (or custom) software engine/rasterizer over
the framebuffer API, if you really need to run without 3D acceleration.

A port of the SDL 1.2 rendering code and API over this framebuffer API would
be an obvious add-on library candidate - preferably with an option to wire it
to the accelerated SDL 1.3 API when acceleration is available. Another idea
would be to port some software OpenGL implementation.On Tuesday 01 February 2011, at 16.48.32, Greg Jandl <greg.jandl at gmail.com> wrote:


//David Olofson - Consultant, Developer, Artist, Open Source Advocate

.— Games, examples, libraries, scripting, sound, music, graphics —.
| http://consulting.olofson.net http://olofsonarcade.com |
‘---------------------------------------------------------------------’

[…]

There are plenty of developers who would like to have a fallback
option if the hardware drivers are broken or even just not installed.
Granted, often it makes more sense to just bail, but, for some
applications like educational applications, analytic visualization and
even casual games, it is perfectly viable to fall back to software
rendering.

This is what I’ve been thinking as well, but I think it basically comes down
to this: You either use “2D over 3D” style rendering, or you don’t. It’s kind
of ridiculous to demand hardware acceleration, and then do nothing but plain
rectangular blits. (For this reason, it seems rather strange to me to restrict
the SDL 1.3 API to rectangular operations and no rotation or arbitrary
polygons.)

While I agree that the lack of rotation is a wart, you’re forgetting
something even more basic: blending. Per-pixel alpha w/o hardware
support is very costly.

It’s relatively easy, and often even preferable, to create sprite
sheets w/pre-rotated images. However, though color keying works for
pure binary alpha, doing full alpha doesn’t have a similar work
around.

With the current state of things, I’m having a hard time seeing why one would
design a new game to run within the limitations of a “pure 2D” API - and if it
still requires OpenGL or Direct3D to run, it’s just ridiculous…!

I clearly disagree. There are loads of games I’d like to write within
just such a “limited” system, from relatively simple puzzle games to
isometric tile based games. Again, I’d really like rotation as well,
but still - the SDL 1.3 API gets me most of what I want at the moment
(at least when combined with _mixer, _image, etc.).

Again, I’m not personally opposed to doing away with the software
renderer, I just understand the reasons for wanting to keep it.

I do, however think that the software renderer shouldn’t hold back the
mainline rendering system. For example, just because rotation is slow
in software, doesn’t mean it shouldn’t be available in the hardware
path.

It’d be nice to have a way to query the system to tell if each major
function (blit, blending, rotation, etc.) is accelerated in the
current renderer. That would allow an application to adapt to the
system’s capabilities.

Of course this is all moot, as Sam stated waaaaaaaay up-thread that
SDL_1.3 isn’t dropping the software rendering path.On Wed, Feb 2, 2011 at 08:16, David Olofson wrote:

On Tuesday 01 February 2011, at 16.48.32, Greg Jandl <@Greg_Jandl> wrote:

Do what you can, where you are, with what you have. - T. Roosevelt