FLTK logo

[fltk.general] Re: Mac OS drawing lag

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.general  ]
 
Previous Message ]New Message | Reply ]Next Message ]

Re: Mac OS drawing lag Ian MacArthur Nov 29, 2022  
 
On Tuesday, 29 November 2022 at 07:46:11 UTC Arnis wrote:

I have this problem on Mac OS 12 and 13 where my drawing functions are very "sluggish". For example dragging feels very rough. For some time I though that I just wrote the thing in a very inefficient way and tried to optimize it but without success. The code simply listens on drag events and calls window to redraw. And in the draw function there is just fl_rect function call.

So... I don't have an answer for this, but some observations (that probably are not relevant!)

A while back I had a similar-sounding issue on macOS (well, it was OSX then!) but in my case the drawing was GL based. On the main monitor the GL context was sync-locked to the monitor and so only redrew each frame at 60Hz. And it was trying to draw *a lot* of frames (way too many...)
On the external monitor the GL context wasn't sync-locked, so it was running free, and could redraw all the same frames in the blink of an eye.
Which sounds like a similar problem - but may be entirely unrelated!

On a related note, triggering a lot of redraws from within the handle method is unlikely to be "efficient" anyway, I suspect. But, as Matt says we might need to see a worked example of what you are actually doing here, to better illuminate the issues.

--
You received this message because you are subscribed to the Google Groups "fltk.general" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fltkgeneral+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/fltkgeneral/dc834679-725a-4d57-8101-e166734420e1n%40googlegroups.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'.