tuupola / hagl

Hardware Agnostic Graphics Library for embedded
https://www.appelsiini.net/tags/hagl/
MIT License
293 stars 47 forks source link

Input API? #80

Closed RobLoach closed 1 year ago

RobLoach commented 1 year ago

Abstracting the way input is handled within the Backend will mean an easy way to implement different HAGL applications and allow running able them across different backends.

Is this something that you've been considering? Maybe like a keystate() or input() callback or something to set the input state across input devices.

tuupola commented 1 year ago

Not considering since HAGL is a graphics library not a general purpose library. I remember seeing hardware agnostic input libraries but I do not remember their names anymore though.

RobLoach commented 1 year ago

Thanks! Love where this is going and really excited to see it grow.

tuupola commented 1 year ago

Now when you said it a hardware agnostic input library is really good idea for an open source project. I do remember seeing one at some point. I have no idea what the name was.

CHiPs44 commented 1 year ago

HAIL?

oschettler commented 8 months ago

Hi, for an app that should be portable across desktop and micro-controllers like the Wio Terminal, HAGL helped a lot.

Now I am at exactly this point where I would like to process some buttons in a portable way. The easiest approach seams to be to structure an agnostic library ("hail_*) similar to hagl and to have different HAL implementations for SDL2, Arduino/Bounce2 etc.

It would be nice if something like this already existed.

I briefly looked into UXN/Varvara, but it has a whole virtual machine to cope with.

tuupola commented 8 months ago

There is two I have been pondering to test for a while. Quickly glancing I like the way they look and how api is structured.

https://github.com/rxi/microui https://github.com/abhra0897/LameUI

tuupola commented 8 months ago

Ah sorry I misread. I thought you meant UI but it was about input devices.