Advertisement

Input Library in linux

Started by November 20, 2003 08:46 AM
4 comments, last by browny 20 years, 10 months ago
Is there any DirectInput sortof library for Linux. Some might suggest using SDL for that purpose.. but i just dont want to mess my already built engine with SDL now. How did Quake3 and other cross platform engines address this issue of "INPUT" ?
Z
I think the general way of writing a cross-platform * is to seperate all the platform dependent stuff (windowing, graphics, sound, input, etc) into seperate modules, and perform all the interfacing to the OS through those modules. The rest of the program can be written in a standard, cross-platform way, so when you need to port a program to a new OS, you only need to rewrite the interface module, and the rest of the code (should) recompile without needing to be touched. Something like SDL is basically a pre-written compatibility layer, so you don''t have to write one.
Advertisement
quote: Original post by browny
Is there any DirectInput sortof library for Linux. Some might suggest using SDL for that purpose.. but i just dont want to mess my already built engine with SDL now. How did Quake3 and other cross platform engines address this issue of "INPUT" ?


either (a) they didn''t use DirectInput to begin with, since they weren''t writing it only for windows or (b) what garfong said or (c) they did "mess" their engine with a new library.
Well, why not download, say, the Quake II source and take see how Carmack did it?
You could technically use X, but that will mess you up much, much more than SDL.

The official zorx website
Zorx (a Puzzle Bobble clone)Discontinuity (an animation system for POV-Ray)
the ut series uses sdl.

quake 3 seems to use native X functions as it doesnt link to other libs, not that this means anything (dynamic loading) but also the requrements dont list anything else...

for others im not sure but i think sdl is very common.
http://mitglied.lycos.de/lousyphreak/

This topic is closed to new replies.

Advertisement