Archived

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

dario_s

handling keyboard input

Recommended Posts

Im wondering if anyone knows how to do this without using DirectX and yet do it smoother than with a plain windows message handler..? Is there no API, like fmod for music? I dont wanna use DirectInput because it seems foolish to mix DirectX with OpenGL when I''ve already made everything else without using DirectX...

Share this post


Link to post
Share on other sites
You could use SDL for setting up GL, the Window, and input. Although, I believe it uses DirectInput as a backend because it''s the only real thing Windows has. But, hey, atleast you don''t have to use it directly. There''s nothing wrong with that though, Quake has used GL + DirectInput/Sound.

Share this post


Link to post
Share on other sites
Quake 1 and 2 use straight X11 for most things, and also offer SDL backends (but give a few warnings, but IIRC, SDL wasn''t really that mature in those days). Can''t say anything about Quake3''s situation on Linux, but it''s probably SDL, since it runs better (that, or Carmack became more fluent with X11).

Anyway, I was preferring to the Win32 version. You probably don''t need to write a backend for every subsystem for every target platform like Carmack did, so you can stick to SDL.

Share this post


Link to post
Share on other sites