FLTK logo

Re: [fltk.coredev] Towards a Wayland platform for the FLTK library ?

FLTK matrix user chat room
(using Element browser app)   FLTK gitter user chat room   GitHub FLTK Project   FLTK News RSS Feed  
  FLTK Apps      FLTK Library      Forums      Links     Login 
 All Forums  |  Back to fltk.coredev  ]
 
Previous Message ]New Message | Reply ]Next Message ]

Re: Towards a Wayland platform for the FLTK library ? Ian MacArthur Jun 07, 2021  
 
On 7 Jun 2021, at 21:01, Bill Spitzak wrote:
> 
> I think there is some mistakes in current FLTK, in particular the "Driver" api, which uses virtual functions for no reason whatsoever as the called code is chosen at compile time, and as seen here the design makes it really difficult to share code. Would prefer to use #if statements like they are supposed to. I don't consider the current design readable or maintainable. I may be missing some function of Driver where more than one can be used, please correct me if I am wrong.

I think the *idea* (if not yet the actuality) of this is that at some point it stops being a compile time option and becomes more of a runtime option: indeed X11 vs. Wayland (or GDI vs. GDI+) might be ideal cases where that might come into play... But not quite yet.


> The "Device" is somewhat useful as it allows you to draw widgets in GL windows. I think there is also an attempt to allow it to print, though I am unclear if it is actually possible to use it for that and if anybody has done so. I still feel the number of virtual functions on it is excessive.

The printing support works pretty well, I’ve used it a fair bit and been quite pleased with the outcomes...
I have no opinion on what constitutes “too many” virtual functions. (Though, if the compiler can resolve the types statically, and often it can, then the virtualisation may be “free” at that point anyway. Which doesn’t help readability, I concede, but it’s helpful for runtimes.)


> It sounds like Cairo is nowhere near as slow as others have claimed.

It can be - just when you think it’s all going so well, it sneaks around and sticks you from behind!
There’s just “some things” on “some machines” where it suddenly runs like treacle; and I’m not even sure if it is the *same* things in each case...



-- 
You received this message because you are subscribed to the Google Groups "fltk.coredev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fltkcoredev+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/fltkcoredev/E5769151-60F8-4A5A-B88D-44AC2F2FA096%40gmail.com.
Direct Link to Message ]
 
     
Previous Message ]New Message | Reply ]Next Message ]
 
 

Comments are owned by the poster. All other content is copyright 1998-2024 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.