What about OpenGL for 2D game engines?
IMHO, you should definitely consider this if you’re interested in
making use of machines with 3D acceleration - the speed-up is
tremendous, especially for higher resolutions on fast accelerators.
(Modern PCs aren’t built for software rendering…) The added
blending and transformation capabilities that come virtually for free
(WRT coding as well as performance), can be seen as an extra bonus.
Now… are there plans to support this internally (if available) in
SDL?
In other words, say on a Linux box you’re running an SDL app. with a
lot of alpha blits. If the machine has an accellerated card, will SDL,
at some point, be able to take advantage of this?
I don’t know if there are any plans, but I’m not counting on it. Apart
from anything based on OpenGL having various problems with being
compatible with the SDL 2D API without killing performance, it would lack
virtually all advantages of using OpenGL directly. It would basically be
a performance hack for targets with poor 2D acceleration, but with decent
3D acceleration. Not sure if anyone would consider it worth the effort.
In other words, I’m really comfortable with SDL, and really
uncomfortable with OpenGL. Both are about a sportable as the
other, but I’m lazy and busy, and don’t do too much true 3D stuff, so
SDL is incredibly more useful. It just can be slow sometimes.
My approach is to use a higher level API (with transformation support and
stuff, preferably using a coordinate system that’s not bound to the
screen resolution) and then implement that for
* SDL + some 2D software rendering library
as well as
* SDL + OpenGL.
and possibly
* other targets, if there's any point in that.
Unfortunately, my work in that area is progressing very slowly, but I can
send you some early prototype code if you like.
(It’ll be in some version of Project Spitfire, or something based on the
new engine for that game, but I’m planning to get an SDL 2D only version
"playable" before digging into the OpenGL stuff again. Status:
Rendering, SDL: 100%
Rendering, OpenGL: 30% (Not in the same source tree.)
Control system: 90% (Collision detection and
spawning/shooting not implemented.)
Scripting engine: 60% (OO style, "initializers" with
inheritance, easy to use "plugin"
system for application specific
types, keywords and commands.)
Retro sound fx engine: 100% (Runs on SDL audio and PC speaker
under X and Linux console.)
New sound effects: 0%
Music: 0%
Graphics: 10%
Levels: 10%
Intro, highscore etc: 0%
//David Olofson — Programmer, Reologica Instruments AB
.- M A I A -------------------------------------------------.
| Multimedia Application Integration Architecture |
| A Free/Open Source Plugin API for Professional Multimedia |
----------------------> http://www.linuxaudiodev.com/maia -' .- David Olofson -------------------------------------------. | Audio Hacker - Open Source Advocate - Singer - Songwriter |
--------------------------------------> david at linuxdj.com -'On Tuesday 07 August 2001 19:54, William Kendrick wrote:
On Tue, Aug 07, 2001 at 12:50:49PM +0200, David Olofson wrote: