DirectInput Alternatives

Started by
6 comments, last by Seroja 18 years, 10 months ago
I use VB.Net and OpenGL, so I would prefer not to use DirectX as well. Is there any fast and reliable way to get input (at least mouse and keyboard, nevermind joysticks and other stuff)? WinForms events are really slow. I know there are a few functions in Win32 API, but is there another way? And what do other platforms use (Linux, Mac)? Thanks in advance.
Advertisement
This is not exactly the answer you are looking for, but I would recommend using either SDL or Allegro. It seems like you simply want to using some multi-platform libraries, and both of these choices will satify that requirement.
Is it possible to just use DI with something like openGL?
because for my next project I wish to see what DirectInput can do because soooo many people love working with it.
Quote:Original post by fooman_69
Is it possible to just use DI with something like openGL?
because for my next project I wish to see what DirectInput can do because soooo many people love working with it.


Yes
I don't think SDL nor Allegro would be a good fit for a .Net application.

The Managed DirectX interface to DirectInput is probably the best method if you don't want to dig into the Win32 API.
- The trade-off between price and quality does not exist in Japan. Rather, the idea that high quality brings on cost reduction is widely accepted.-- Tajima & Matsubara
I don't mind digging into Win32 API, anyway I use it to setup OpenGL. The point is, is Win32 API fast enough for gaming? Or will it still be significantly slower than DirectInput?

Out of the APIs, there is GetAsyncKeyState, GetKeyboardState, GetKeyState and maybe even more. Which one is the most efficient?

And a question that has been posted on .Net forum and not answered, is there any straightforward way to obtain mouse delta (e.g. movement, and not the absolute position), even if the mouse reached the end of the screen?
These functions will be quite fast enough (especially if you're using VB)[smile]
Quote:Original post by Simian Man
(especially if you're using VB)[smile]

Come on, VB isn't that slow... The only time I had serious trouble about it's speed was actually when I wrote an ActiveX wrapper to DirectInput, and because of DirectInput being TOO fast the control didn't have enough time to fire events :P
Currently I can get 100FPS on 700Mhz & GeForce2 if I don't render too much stuff, so that's fast enough for me :)

Which of the functions to poll keyboard and mouse to use? And how it works on other platforms?

This topic is closed to new replies.

Advertisement