Hello Guest

LWJGL Input

  • 20 Replies
  • 16345 Views
*

Offline oNyx

  • ***
  • 177
  • 弾幕
LWJGL Input
« Reply #15 on: June 28, 2005, 09:15:43 »
<kevglass> woot
<kevglass> jinput binaries
<Mazon> :)
<aho> :o
<kevglass> spose I'll have to find time to sort it out now :)
[...]
<aho> thought about throwing some getSimpleX/Y() methods which also throw in pov stuff (makes it rather reliable... so i've heard) :>
<kevglass> post it on the forum
<kevglass> let someone decide
<kevglass> I'll just do whatever the concensus wants

Opinions please :)

LWJGL Input
« Reply #16 on: October 02, 2005, 20:44:54 »
Hi, nice work with the joystick support! :D

Though I have some issue:
When I enable polling of events for the joystick controllers my keyboard and mouse stop responding in the application. I have a combined mouse and keyboard device which has category 'device' (neither keybord nor mouse; on Windows) - any ideas what to do?
(One could search for "Mouse" or "Keyboard" in the name, but I would consider that pretty dirty...)

Second thing: I don't like the constantly created event-objects :? (after a while the gc has to collect them and causes lag, no?)  Any chance to get rid of them? E.g. doing method calls with current event fields as parameters?

Btw. any plans for rumble support?  :)

*

Offline oNyx

  • ***
  • 177
  • 弾幕
LWJGL Input
« Reply #17 on: October 02, 2005, 22:01:35 »
Try calling Controllers.create() prior to Display.create().

I'm not really sure if thats still necessary with the current version (included in lwjgl 0.98 )... however, it does work there, too.

And those few objects. They are tiny and short-living. They aren't a problem at all (even on the slowest machine here... its a k6-2 300mhz/128mb/voodoo banshee 16mb).

Recreating buffers is slow (re-use em) or creating several thousand objects per frame, but a handfull tiny wrapper thingies dont change a thing ;)

(Always use a profiler prior to optimisation)

LWJGL Input
« Reply #18 on: October 03, 2005, 08:19:02 »
It helps, thanks!

Regarding the event objects: whatever you say  :wink:
- can that really be measured by a profiler? Which one?

*

Offline oNyx

  • ***
  • 177
  • 弾幕
LWJGL Input
« Reply #19 on: October 03, 2005, 10:57:33 »
I didnt really took a closer look. I just know that there wasnt a measurable difference between the version without input stuff and the one with input stuff. Therefore I didnt bother to do any real comparision ;)

Either way its like 0-5 tiny objects per frame. You can create way more objects before it gets troublesome.

And profilers... well, you can try the -Xprof and -Xloggc:<file> flags. You can also try the rather new netbeans profiler or one of those eclipse profiler plugins.

LWJGL Input
« Reply #20 on: October 22, 2005, 18:29:24 »
When using a Controller, how do I know which of the GetXAxisValue/GetYAxisValue/etc. methods represent something on the controller, and which are inert because the controller doesn't support them? Do I have to use getAxisName to find out which are present?