Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Libgdx multitouch on desktop systems

I have a monitor with multi touch. It's possible to handle multi touch in libgdx on desktop systems(win7, osx...)?

like image 217
zella Avatar asked Feb 21 '14 03:02

zella


1 Answers

Nope.

Libgdx uses LWJGL as its desktop platform backend (*). You can see in LwjglInput.java that supportsMultitouch() returns false, and that it hardcodes pointer numbers other than 0 as returning fixed values.

I think LWJGL would have to support multi-touch before Libgdx would be likely to use it. (I'm not sure what the support for multi-touch events in LWJGL is.) If you have some other system API for getting multi-touch events, it shouldn't be too hard to get LwjglInput.java to use it.

(*) There is also a JGLFW backend, but I don't think that is for public use (and I'm not sure if it makes multi-touch input any better).

like image 197
P.T. Avatar answered Oct 11 '22 14:10

P.T.