Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 6 of 6

Thread: How can I use keyboard input in my opengl game engine?

  1. #1
    Intern Contributor
    Join Date
    Dec 2000
    Location
    Almazora, Spain
    Posts
    95

    How can I use keyboard input in my opengl game engine?

    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.
    MeTaL WiLL NeVeR DiE!!!!!

  2. #2
    Member Regular Contributor
    Join Date
    Sep 2000
    Location
    Vancouver BC Canada
    Posts
    418

    Re: How can I use keyboard input in my opengl game engine?

    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.

  3. #3
    Intern Contributor
    Join Date
    Dec 2000
    Location
    Almazora, Spain
    Posts
    95

    Re: How can I use keyboard input in my opengl game engine?

    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??
    MeTaL WiLL NeVeR DiE!!!!!

  4. #4
    Member Regular Contributor
    Join Date
    Sep 2000
    Location
    Vancouver BC Canada
    Posts
    418

    Re: How can I use keyboard input in my opengl game engine?

    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.

  5. #5
    Intern Contributor
    Join Date
    Dec 2000
    Location
    Almazora, Spain
    Posts
    95

    Re: How can I use keyboard input in my opengl game engine?

    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.
    MeTaL WiLL NeVeR DiE!!!!!

  6. #6
    Member Regular Contributor
    Join Date
    Sep 2000
    Location
    Vancouver BC Canada
    Posts
    418

    Re: How can I use keyboard input in my opengl game engine?

    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •