PDA

View Full Version : How can I use keyboard input in my opengl game engine?



Sansus
04-12-2001, 08:45 AM
How can I read the keyboard input from my Opengl Game Engine under Linux??? I don't want to use SDL. There is any library??? I am using Mandrake Linux 6.2.

rts
04-12-2001, 09:35 AM
Well, SDL is a library, but since you don't want to use it, your options are (this list is probably not exhaustive):

X11 keyboard/event stuff (see your local X11 documentation for that) GLUT keyboard stuff (glutKeyboardFunc, glutSpecialFunc, glutKeyboardUpFunc, glutSpecialUpFunc)

Have fun.

Sansus
04-13-2001, 06:57 AM
And what about the X11 extensions? there is any extension that let me use the keyboard??? Maybe X Input extension??? What is exactly this extension used for??

rts
04-15-2001, 01:42 PM
I believe X Input extension is for things like exotice mice and joysticks (but double check your documentation to be sure).

When I say "Use X11", I mean the usual event handling sort of stuff.

Sansus
04-21-2001, 12:28 PM
Well, finally I used X11 input events to handle my keyboard functions, but.. There is any library like Direct Input in Win32 which allows me direct access to the hardware, and avoid the X11 **** events??? I don't want to use glut,SDL nor SVAlib.

rts
04-21-2001, 02:10 PM
Originally posted by Sansus:
Well, finally I used X11 input events to handle my keyboard functions, but.. There is any library like Direct Input in Win32 which allows me direct access to the hardware, and avoid the X11 **** events??? I don't want to use glut,SDL nor SVAlib.

Uh... yeah. There are three: glut, SDL and SVGAlib.

Cheers.