Re: [AD] Haptics

[ Thread Index | Date Index | More Archives ]

Or at the least some of the errors and inconsistencies in the docs/API should be fixed. At first read I noticed:

ALLEGRO_HAPTIC_EFFECT: this is very difficult to follow. Should include the declaration of the struct in the documentation.

"replay" field in ALLEGRO_HAPTIC_EFFECT: name suggests playing twice or more but documentation suggests otherwise.

al_release_haptic and al_release_haptic_effect: In Allegro we use destroy which I assume is what these do. They also return bool but that's not mentioned in the documentation. Destroy functions should never return bool generally.

al_get_haptic_active: I'd prefer al_is_haptic_active like the rest.

I guess that's all I saw on a quick look. I can go over it thoroughly later though.

On 29/05/2015 12:54 PM, Trent Gamblin wrote:
I'm writing a complete Lua binding for 5.1 so I'm going over the entire
API. One thing that stands out is haptics. The API appears to be a thin
layer over Linux kernel API. That means it's horrendous to actually use
because it was never intended to be used directly. With all of the other
APIs we sat down and thought of ways to make the interface useful, easy
and simple but not with haptics. I'm proposing that we do a reboot of
the haptics interface or at least consider some friendlier alternatives.
When I look at it and try to actually implement a haptic effect without
studying the code I want to punch my monitor because it's impossible,
particularly the documentation for ALLEGRO_HAPTIC_EFFECT.


Mail converted by MHonArc 2.6.19+