Julien Cl?ment.
sdl at lists.libsdl.org
To subscribe or unsubscribe via the World Wide Web, visit
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
or, via email, send a message with subject or body ‘help’ to
sdl-request at lists.libsdl.org
You can reach the person managing the list at
sdl-owner at lists.libsdl.org
When replying, please edit your Subject line so it is more specific
than “Re: Contents of SDL digest…”
Today’s Topics:
- Re: Proposal: Drop support for software rendering in 1.3
(Sam Lantinga)
- Re: Proposal: Drop support for software rendering in 1.3
(Nicholas Vining)
- Re: Proposal: Drop support for software rendering in 1.3
(Damian Paz)
Message: 1
Date: Fri, 21 Jan 2011 00:39:50 -0800
From: Sam Lantinga
To: SDL Development List
Subject: Re: [SDL] Proposal: Drop support for software rendering in
1.3
Message-ID:
<AANLkTik-55WptWRMUhMxGYB=eY8Xix98RnS7o735Wgmu at mail.gmail.com>
Content-Type: text/plain; charset=“iso-8859-1”
I’ve thought a lot about this, and here’s my thoughts…
SDL serves three types of video API users:
- People who just want a framebuffer and use SDL 1.2 blit and direct pixel
access to do the job.
- People who just want an OpenGL context, and use OpenGL or OpenGL ES to do
the job.
- 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
-------------- next part --------------
An HTML attachment was scrubbed…
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20110121/812d2333/attachment-0001.htm
Message: 2
Date: Fri, 21 Jan 2011 00:53:53 -0800
From: Nicholas Vining
To: SDL Development List
Subject: Re: [SDL] Proposal: Drop support for software rendering in
1.3
Message-ID: <4D3949A1.9010401 at icculus.org>
Content-Type: text/plain; charset=“iso-8859-1”; Format=“flowed”
On 1/20/2011 3:42 PM, Sam Lantinga wrote:
I’m not opposed to this, but I’d like to hear lots of people’s
opinions before making any changes.
Count me among the opposed. I’m actually writing my first post on this
mailing list in five years (I think) to weigh in here, so I suppose
that’s some measure of my opposition.
The main advantage of SDL, versus its competitors, is that SDL is a
lightweight platform that makes certain guarantees. One of these
guarantees is its software render: any application using the sprite and
blit architecture, written with SDL, is pretty much guaranteed to work.
I can sell more games this way, because SDL’s GDI target means that
it’ll work on hideously broken Windows XP installs with incorrect
drivers running DirectX 7, and the user will still get a good framerate.
The software renderer also guarantees that a correctly written SDL
application will, with the exception of the odd platform-specific bug,
work on multiple platforms with minimal code changes. My current project
runs just fine on Windows, OS X, and Linux, because in each case it does
the stupidest thing possible on the operating system of choice. As a
result, I can spend more time working on things that matter, and less
time trying to navigate the complicated and hideous web of bugs that
may, possibly, be related to IHV drivers, but which are made all the
more fun by the fact that all your blitting functions - the things that
you’re trying to debug - are suddenly hidden in another library. SDL
insulates me from all of that. This is a Good Thing.
Why is it a good thing? Simply put, anybody who thinks that software
rendering does not have its place when trying to sell software in the
year 2011 has obviously never had the experience of shipping a
commercial game to real users. Things are somewhat better if you are
trying to sell to the hard-core PC gamer market, but that consists of
about three people in a basement in Grand Forks. Anybody who wants to
sell game software to the casual market will encounter a wide variety of
machine configurations, ranging from the somewhat normal to the
completely insane.
Here’s an example: imagine, for a moment, your grandmother. Now imagine
that your grandmother wants to play your spiffy new Solitare clone. Now
imagine what is involved in telling your grandmother how to install a
new set of video drivers on her aging computer, over the phone. For
bonus points, get her to install an updated DirectX redistributable
runtime as well. I would much rather that my Solitare clone - which
doesn’t need hardware accelerated rendering in the first place - uses
GDI and is done with it.
So, yes, software rendering still has a place in the world. As a further
example of that, I would point out that RAD Game Tools is still selling
Pixomatic, a ridiculously hand-optimized DirectX 7/DirectX 9 drop in
software renderer, as their solution for dealing with just this kind of
hideously broken computer. One company I know, who will not be named,
ships a product with Direct3D, OpenGL and Pixomatic rendering targets.
To their surprise, and mild horror, Pixomatic beats the other two
"hardware-accelerated" render targets in terms of performance on many of
their users’ machine, mainly because their users are running things like
Intel Extreme 2 Integrated Graphics Accelerators, with drivers from
2001, on clapped out Dell Inspirons. You know what? These people deserve
to be able to use and buy our software too. Let them have their software
renderer.
That said, there may be a case for getting rid of a lot of the software
rendering pipeline in SDL. I would be fine, for instance, if SDL 1.3
just gave me a framebuffer and told me to fill it. Radically
streamlining the software rendering pipeline in this fashion so that
other parts of SDL 1.3 can be finished might be a good trade-off. We
could also get rid of a bunch of things, like line drawing functions,
that don’t really meet the “Simple” criterion of the Simple DirectMedia
Layer.
In my mind, it is not acceptable for us to get rid of the software
renderer in exchange for a bunch of fancy, bejewelled gewgaws like
"hardware accelerated rotational blitting", whatever the heck that is.
If you want to have a game with rotating sprites, you have two sane
choices.
-
Use OpenGL (or Direct3D), and do the math yourself, in the
application, to calculate the rotated position of the four points of the
sprite. Draw a textured quad spanning those points. The math is very
simple, consisting of a 2x2 matrix rotation, and has been known since
the 17th century. It is also very easy to set OpenGL up with an
orthographic projection.
-
Do the math to calculate the rotated position of the four points of
the sprite, and then write your own texture blitter. The math is still
very simple, and you can still find an accurate depiction of the texture
mapping process in sources such as Michael Abrash’s Graphics Programming
Black Book, which is still available online.
Forcing SDL to carry these burdens for you is not a sane choice, nor is
it a choice that is compatible with the library’s designated purpose:
providing a thin layer of access, in a cross-platform manner, to OS
level multimedia facilities. I must confess, I’m already puzzled as to
why we have things like line drawing functions in SDL 1.3. Bresenham’s
line algorithm is a fun, easy programming exercise that programmers of
all ages and skill levels can enjoy, and I don’t think that it’s fair to
deprive people of this pleasure.
I would encourage anybody who thinks that they have a good idea for SDL
to strongly consider what the feature they propose adds, and at what
cost. Feature creep is a very, very good way to kill projects.
Signing out for another five years,
N.
Nicholas Vining
Lead Programmer, Gaslamp Games
Dungeons of Dredmor, Coming in April 2011: http://www.gaslampgames.com
-------------- next part --------------
An HTML attachment was scrubbed…
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20110121/c9dc882b/attachment-0001.htm
Message: 3
Date: Fri, 21 Jan 2011 00:59:51 -0800 (PST)
From: Damian Paz
To: SDL Development List
Subject: Re: [SDL] Proposal: Drop support for software rendering in
1.3
Message-ID: <114915.23811.qm at web112607.mail.gq1.yahoo.com>
Content-Type: text/plain; charset=“us-ascii”
To be honest I’ve never thought about using SDL to write a game for a 386 SXL. I
just wanna have a cross platform API that will allow me to create an OpenGL
context to do something that is worth watching at with ease, having event
handling and sound management is just a bonus for me.
From: Nicholas Vining
To: SDL Development List
Sent: Fri, January 21, 2011 5:53:53 AM
Subject: Re: [SDL] Proposal: Drop support for software rendering in 1.3
On 1/20/2011 3:42 PM, Sam Lantinga wrote:
I’m not opposed to this, but I’d like to hear lots of people’s opinions
before making any changes.
Count me among the opposed. I’m actually writing my first post on this
mailing list in five years (I think) to weigh in here, so I suppose that’s
some measure of my opposition.
The main advantage of SDL, versus its competitors, is that SDL is a
lightweight platform that makes certain guarantees. One of these guarantees
is its software render: any application using the sprite and blit
architecture, written with SDL, is pretty much guaranteed to work. I can
sell more games this way, because SDL’s GDI target means that it’ll work on
hideously broken Windows XP installs with incorrect drivers running DirectX
7, and the user will still get a good framerate. The software renderer also
guarantees that a correctly written SDL application will, with the exception
of the odd platform-specific bug, work on multiple platforms with minimal
code changes. My current project runs just fine on Windows, OS X, and Linux,
because in each case it does the stupidest thing possible on the operating
system of choice. As a result, I can spend more time working on things that
matter, and less time trying to navigate the complicated and hideous web of
bugs that may, possibly, be related to IHV drivers, but which are made all
the more fun by the fact that all your blitting functions - the things that
you’re trying to debug - are suddenly hidden in another library. SDL
insulates me from all of that. This is a Good Thing.
Why is it a good thing? Simply put, anybody who thinks that software
rendering does not have its place when trying to sell software in the year
2011 has obviously never had the experience of shipping a commercial game to
real users. Things are somewhat better if you are trying to sell to the
hard-core PC gamer market, but that consists of about three people in a
basement in Grand Forks. Anybody who wants to sell game software to the
casual market will encounter a wide variety of machine configurations,
ranging from the somewhat normal to the completely insane.
Here’s an example: imagine, for a moment, your grandmother. Now imagine that
your grandmother wants to play your spiffy new Solitare clone. Now imagine
what is involved in telling your grandmother how to install a new set of
video drivers on her aging computer, over the phone. For bonus points, get
her to install an updated DirectX redistributable runtime as well. I would
much rather that my Solitare clone - which doesn’t need hardware accelerated
rendering in the first place - uses GDI and is done with it.
So, yes, software rendering still has a place in the world. As a further
example of that, I would point out that RAD Game Tools is still selling
Pixomatic, a ridiculously hand-optimized DirectX 7/DirectX 9 drop in
software renderer, as their solution for dealing with just this kind of
hideously broken computer. One company I know, who will not be named, ships
a product with Direct3D, OpenGL and Pixomatic rendering targets. To their
surprise, and mild horror, Pixomatic beats the other two
"hardware-accelerated" render targets in terms of performance on many of
their users’ machine, mainly because their users are running things like
Intel Extreme 2 Integrated Graphics Accelerators, with drivers from 2001, on
clapped out Dell Inspirons. You know what? These people deserve to be able
to use and buy our software too. Let them have their software renderer.
That said, there may be a case for getting rid of a lot of the software
rendering pipeline in SDL. I would be fine, for instance, if SDL 1.3 just
gave me a framebuffer and told me to fill it. Radically streamlining the
software rendering pipeline in this fashion so that other parts of SDL 1.3
can be finished might be a good trade-off. We could also get rid of a bunch
of things, like line drawing functions, that don’t really meet the "Simple"
criterion of the Simple DirectMedia Layer.
In my mind, it is not acceptable for us to get rid of the software renderer
in exchange for a bunch of fancy, bejewelled gewgaws like “hardware
accelerated rotational blitting”, whatever the heck that is. If you want to
have a game with rotating sprites, you have two sane choices.
-
Use OpenGL (or Direct3D), and do the math yourself, in the application,
to calculate the rotated position of the four points of the sprite. Draw a
textured quad spanning those points. The math is very simple, consisting of
a 2x2 matrix rotation, and has been known since the 17th century. It is also
very easy to set OpenGL up with an orthographic projection.
-
Do the math to calculate the rotated position of the four points of the
sprite, and then write your own texture blitter. The math is still very
simple, and you can still find an accurate depiction of the texture mapping
process in sources such as Michael Abrash’s Graphics Programming Black Book,
which is still available online.
Forcing SDL to carry these burdens for you is not a sane choice, nor is it a
choice that is compatible with the library’s designated purpose: providing a
thin layer of access, in a cross-platform manner, to OS level multimedia
facilities. I must confess, I’m already puzzled as to why we have things
like line drawing functions in SDL 1.3. Bresenham’s line algorithm is a fun,
easy programming exercise that programmers of all ages and skill levels can
enjoy, and I don’t think that it’s fair to deprive people of this pleasure.
I would encourage anybody who thinks that they have a good idea for SDL to
strongly consider what the feature they propose adds, and at what cost.
Feature creep is a very, very good way to kill projects.
Signing out for another five years,
N.
Nicholas Vining
Lead Programmer, Gaslamp Games
Dungeons of Dredmor, Coming in April 2011: http://www.gaslampgames.com
-------------- next part --------------
An HTML attachment was scrubbed…
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20110121/a25a6427/attachment.htm
SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
End of SDL Digest, Vol 49, Issue 105