Graphics Library for D

Adam Wilson flyboynw at gmail.com
Tue Jan 7 10:59:50 PST 2014


On Tue, 07 Jan 2014 05:34:08 -0800, Ola Fosheim Grøstad  
<ola.fosheim.grostad+dlang at gmail.com> wrote:

> On Tuesday, 7 January 2014 at 13:18:51 UTC, Dmitry Olshansky wrote:
>> The difference might be in that DX is huge framework, and vendors  
>> effectively write small "core" for it.
>
> I think this is all just a misunderstanding. Adam probably just meant  
> that DX drivers are being updated automatically by Microsoft while you  
> have to download the GL drivers yourself. But I never meant that the  
> graphics library should expose GL-only functionality...
>
>> With GL the balance could be the other way around, but GL doesn't try  
>> to be all of the many facets of the multimedia in the first place.
>> (and now with DirectCompute I'm not even sure what DX wants to be  
>> actually)
>
> Yes, and I think this is a very good point for why the reference  
> implementation should not be in DX. You risk ending up with all other  
> platforms having to implement DX components that are not in GL (and  
> there is a lot of them).
>

You seem very concerned that the low-level API will effect the design of  
the high-level API. If that happens we've failed and need to try again.  
Plenty of other libraries have done this so I don't see this as anything  
other than a theoretical risk that can be designed around.

> E.g. in GL you cannot do anything without writing your own shaders and  
> there is no notion of 2D-anything… Many of the GL calls and parameters  
> are actually also legacy calls so the REAL OpenGL ES API that you are  
> likely to use is quite limited and bare bones.
>
> Another reason I've already mentioned is to test feature  
> coverage/performance on multiple platforms which only OpenGL ES enables.
>
> Yet another reason is to allow/encourage as many as possible to dabble  
> with the API early on to increase the usability of it. Which actually  
> might be the most important aspect.

I asked Mike Parker about this at Dconf 2013, with the intent of having a  
reference implementation. You know what he said? Don't bother. Because in  
the end it does not matter which implementation you start with, other  
API's will look different no matter what you do, even for OGL (differing  
implementations), differing fonts, differing rendering pipelines, etc...  
His advice was to pick whatever worked best for the implementor and make  
the other API implementations look as close a possible and have people  
submit bug reports. Eventually they will match on a per-pixel basis but  
shooting for that goal out of the gate is a waste of effort.

-- 
Adam Wilson
IRC: LightBender
Aurora Project Coordinator


More information about the Digitalmars-d mailing list