[SDL] 2D API evolution (SDL 1.3/2.0)

David Olofson david at olofson.net
Sun Aug 27 14:16:56 PDT 2006


On Sunday 27 August 2006 22:09, Ryan C. Gordon wrote:
> > That's the advantage of run time assembled shaders.
> 
> I have an irrational love for things like Pixomatic and SwiftShader,
> but even with an open source option, there's a lot of platforms and
> CPUs we'd have to either eject or provide a generic fallback for
> anyhow.

Yeah, I like that sort of stuff too - and it annoys me that there just 
isn't a way of having a perfect solution for all platforms.

However, I think that to be realistic, in terms of solving real 
problems in the real world, it boils down to a priority matrix, 
looking somewhat like this:

(Rows are platforms/APIs; columns are kind of application.)

                Basic 2D    Advanced 2D    Full 3D

    OpenGL       Top(1)       Top(1)      Top(1)

    Direct3D     High(2)      High(2)     Low(3)

    2D APIs on
    popular      Top(4)       Low(5)      Low(5)
    platforms

    Other        Medium(6)    Low(7)      Low(7)

Notes:

(1) OpenGL is obviously top priority regardless of what
    you want to do with it; use it as a 2D backend, or
    use it directly - simply because with this in place,
    things will at least be possible to get to work
    pretty much everywhere, if you can get proper drivers
    installed. We need these three ASAP, so we can at
    least start *developing* on any (sensible) platform.

(2) Basic and advanced 2D over Direct3D gets rather high
    priority because it's the only thing that works
    reliably on the vast majority of computers on this
    planet. Windows systems out there that do not have,
    and most probably never will have, proper OpenGL
    drivers. We just have to accept that, or accept a
    drastically reduced potential user base.

(3) Low priority for 3D over Direct3D part, as I believe
    3D games in general can either use one of the several
    3D engines out there that already support both OpenGL
    and Direct3D, or have a sufficient budget that one
    can just implement both OpenGL and Direct3D support
    if desired. Also, there isn't really much we can do
    about this anyway.

(4) Of course, the main point with portability is having
    things run on the largest number of machines possible.
    That is, pick the N biggest platforms in terms of
    user base.

(5) Odd 3D APIs that are not compatible with OpenGL? Well,
    shouldn't be a problem to implement SDL 2D over these.
    Then (the) Advanced 2D add-on lib(s) can support
    transforms, blending and stuff over them as well.
    Full 3D is probably best left to applications, as
    usual.

(6) Not all that high priority for 2D over 2D APIs, as
    SDL 1.2 handles that well on a wide range of
    platforms already. Multiple window support for
    portable GUIs and stuff like that would be nice
    though...

(7) Simply not worth the effort. If someone is really
    motivated to implement and maintain a Glide backend
    (for example), fine - but, seriously...?


//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  --'




More information about the SDL mailing list