How do you solve keyboard and mouse input ?
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?
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.
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.
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.
if you need "more" than just that and want to be more or less platform independent then use sdl.
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)...
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)...
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement