[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Input SDK
Ivan Zivkovic wrote:
> GLUT was suggested concerning the input that works with Mesa.
> I've been looking at GLUT before and I found it is very nice
> and simple to work with. It is great for small and medium OpenGL
> projects, like demos and such. I'm sure I will use GLUT for most
> of my OpenGL programs.
I've used GLUT in a 1,000,000 line OpenGL program at work. It's
fine for LARGE projects.
> On the other hand, GLUT has many serious
> limitations(correct me if I'm wrong). It has no support for mouse.
That's not true - it supports the mouse perfectly well. I've
written lots of programs that use the GLUT mouse code without
> It has a framework which I hate and wish it could go away.
You mean the 'glutMainLoop' thing? That's fixed in 'freeglut',
the new freeware GLUT clone that you can find at:
...and it's really easy to patch the 'real' GLUT to solve
...although I quite understand why you'd probably not want
to do that.
> I just
> can't stand that kind of limitations imposed on my code. Keyboard
> support isn't so great either.
> I need some kind of keyboard system that has an array of key states.
> I could then check at any time wich ones of the keys are pressed
> and which ones aren't.
Well, it only takes a handful of lines of code to convert the GLUT
interface to the one you like. Just set and unset the elements of
your array in the GLUT keyboard callbacks. A handful of lines of
code should nail that one.
Problems with GLUT are:
* Support for only one joystick.
* Menu's unusable on Voodoo 1/2's.
* New 'gameglut' code for 'full screen mode' is somewhat
* Lots of old baggage present to support obsolete
freeglut has already fixed some of these - my PLIB library
fills in some more of the holes (eg with a better joystick
handler, menu's done in OpenGL, etc).
So, GLUT has a few small problems (what API doesn't?) - but
because it gives portability onto pretty much any platform
that runs OpenGL, it's a win for me....and with freeglut now
available as a close clone, I think we should look forward to
seeing all the minor hassles fixed pretty soon.
Steve Baker (817)619-2657 (Vox/Vox-Mail)
Raytheon Systems Inc. (817)619-2466 (Fax)
Work: email@example.com http://www.hti.com
Home: firstname.lastname@example.org http://web2.airmail.net/sjbaker1