Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Shadow2

How do you solve keyboard and mouse input ?

This topic is 5353 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

How do you solve keyboard and mouse input if you are using OpenGL? I heard about GLUT ...but I don''t know how to use it? I mean ..is it better to use DirectX for input or Glut...or something simylar?

Share this post


Link to post
Share on other sites
Advertisement
you should check out SDL (www.libsdl.org)
its pretty easy to set up your input handling with it.
to get tutorials for SDL just have a look at the website or just google for it.

Share this post


Link to post
Share on other sites
something i switched to today because sdl was a pain in the... glfw. its pretty basic though, window, keyboard, mouse, joystick and thats it, doesnt seem to use directx internally like sdl (the reason i picked it, finally debugging without biting the table).

if you need "more" than just that and want to be more or less platform independent then use sdl.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Iam actually using the win32 windows procedure and bools...

i know that some say the windows procedure isn´t fast but it works pretty good

case WM_KEYDOWN:
{

driver.keys[wParam] = TRUE;
return 0;
}

case WM_KEYUP:
{

driver.keys[wParam] = FALSE;
return 0;
}

it works pretty well till now (this is actually the solution from nehe´s OGL page)...

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!