Progress on Adam Wilson's Graphics API?

Rikki Cattermole via Digitalmars-d digitalmars-d at puremagic.com
Sat May 30 19:55:16 PDT 2015


On 31/05/2015 2:38 p.m., Adam D. Ruppe wrote:
> On Sunday, 31 May 2015 at 02:16:02 UTC, Rikki Cattermole wrote:
>> As I've already said, out of the box experience should not rely on 3rd
>> party.
>
> Rely on, no. But package? Sure. I'd be ok with built-in etc.c.sdl
> bindings and such.
>
> Perhaps dub obsoletes this idea, but if someone is willing to use a C
> xml lib or sdl or whatever, sufficiently popular (defined simply by
> "someone took the time to write the bindings and open the PR") libs
> having bindings in there would be nice in a C-batteries included sense.

The way I view it is (lets use image as example).

Phobos would include an abstraction, a set of implementations and 
creation hooks.

The creation hooks would allow converting to and importing certain formats.
Basically global AA full of e.g. delegates to do so.

Now a dub library could implement the abstractions, register there hooks 
and wala.

You can now read a png image, jpeg or what ever and not really care 
about the implementation and it just works. But if you need to you could 
convert it to an SDL image and use it with SDL.

So now a very low entry point for new implementations and usages but 
also a high gain in interoperability between implementations.


More information about the Digitalmars-d mailing list