SciD: the humble beginning

Bill Baxter wbaxter at gmail.com
Tue Dec 15 09:10:47 PST 2009


On Tue, Dec 15, 2009 at 1:00 AM, Lutger <lutger.blijdestijn at gmail.com> wrote:
> Chad J wrote:
>
>> dsimcha wrote:
>>>
>>> ...  The other option is to make
>>> sure everything is loosely coupled to the GUI lib so it can be easily
>>> swapped for
>>> another one.  The downside is that this has some tradeoffs in terms of
>>> simplicity and probably performance that I don't think I want to make and
>>> is probably a classic example of overengineering.
>>
>> Is it really that hard to have the GUI libs in question just give you
>> some pixels in memory or an opengl context?  Then you could use your own
>> highly optimized plot drawing routines instead of relying on the GUI lib
>> to do this.  I figured this kind of thing would be unbeatable for
>> performance, unless the library ties your hands.
>
> If you are willing to do opengl (it's a bit more work) then I think that is
> a very good idea. Both QtD and GtkD should have good opengl interop, so you
> could at a later stage support both libraries.

Biggest problem with OpenGL is that the quality is crap for 2D stuff,
and quality really matters when you're trying to do something like
draw 2000 little markers on a plot and each is only 5 pixels wide.

Best you can do right now with GL without a lot of contortions is
something like 16x oversampling, but that only works on fairly recent
/ high-end cards (no chance on an intel integrated chipset, for
instance).  With analytical antialiasing you get 256 levels (vs just
16 with hardware AA).  The quality difference is very noticeable,
especially on plots with lots of fine lines and tiny markers.

--bb


More information about the Digitalmars-d-announce mailing list