Mouse drawing directly to fb0

Carsten Haitzler raster at rasterman.com
Wed Feb 19 08:58:43 UTC 2025


On Wed, 19 Feb 2025 09:20:45 +0100 "Enrico Weigelt, metux IT consult"
<info at metux.net> said:

> On 18.02.25 08:12, Carsten Haitzler wrote:
> 
> > Advice - don't try and just bolt on a mouse with a hack. reality is to do a
> > mouse, you're doing sprites/overlays and/or compositing (to do it right) so
> > instead of bolting it on with a hack, bite the bullet and work out how to do
> > some proper compositing of images (sprites) off-screen with also retained
> > off-screen content of the screen then transfer any changes on to the screen
> > when done.
> 
> Actually, raw fbdev isn't the right choice for such things - unless one
> really hasn't any other choice.
> 
> DRM has support for such things, easy to use via libdrm:
> https://github.com/metux/twtk/blob/master/src/platform/drm.c

why i mentioned going to swaps (i was implying you'd end up with kms etc.) but
fbdev is a simple way to learn the basics of what a framebuffer is and how to
possibly fill it with content. moving to a nice multi-buffer swapping mechanism
is another stage in the learning... :)

> I'd also recommend using some existing library for drawing (eg. cairo).

i actually suspect that learning something about drawing/rendering and so on is
part of the task... so as a college project ... it's better to DIY with some
cpu compositing to learn it all.. :) what you do to learn and what you do to
get a quick result will be different :)

> > ------------- Codito, ergo sum - "I code, therefore I am" --------------
> 
> Indeed ;-)
> 
> 
> --mtx
> 
> --
> ---
> Hinweis: unverschlüsselte E-Mails können leicht abgehört und manipuliert
> werden ! Für eine vertrauliche Kommunikation senden Sie bitte ihren
> GPG/PGP-Schlüssel zu.
> ---
> Enrico Weigelt, metux IT consult
> Free software and Linux embedded engineering
> info at metux.net -- +49-151-27565287
> 


-- 
------------- Codito, ergo sum - "I code, therefore I am" --------------
Carsten Haitzler - raster at rasterman.com



More information about the xorg mailing list