[cl-opengl-devel] Patch for 2d mipmap generation and more mouse buttons

Johann Korndoerfer cupe-clopengl at erleuchtet.org
Tue Feb 12 18:31:35 UTC 2008


>  I can't speak for the 2D texture section of your patch but none of
> the new enums in callbacks work for me.

> (defmethod glut:mouse ((w gl-window) button state x y)
>   (declare (ignore x y))
>   (format t "~&Button value is ~a ~%Pressed value is ~a~%" button state))


after pasting your glut:mouse into my project, i get:

Button value is WHEEL-DOWN
Pressed value is DOWN
Button value is WHEEL-DOWN
Pressed value is UP

when moving the wheel downward. and:

Button value is BUTTON6
Pressed value is DOWN

when pressing down one of the weird buttons on my mouse. as it should be.

i use opengl 2.1.1 on linux with freeglut 2.4.0.
the new enums are not to be found in my freeglut_std.h along with the
other ones, which makes it kind of odd that they work for me. sdl uses
buttons 4 and 5 as wheel-up/down, too, which is why i tried this in the
first place. they seem not to be "officially" supported on windows
either as there is a patch for a windows port of glut to make it
mousewheel-aware at all at http://www.realmtech.net/opengl/glut.php ,
providing the very same enums.

i found several references on the net indicating the widespread use of
4 and 5 for the wheel and think it is safe to just add the enums to the
bindings. those with an older version of glut seem to not have wheel
functionality anyway and won't be hurt by this.



More information about the cl-opengl-devel mailing list