Richard Rauch - 2005-09-26

Logged In: YES

My impression is that adding per-callback data the way that
you suggest would be problematic. It would perhaps be easier
to have a glutAddCallbackData() which works with the most
recent callback registered/selected. The window callback
registration/use is already wrapped in a macro so window
callbacks would be relatively easy to tinker with that way.
Non-window callbacks would be more difficult.

My initial impression, however, is that this is not an
appropriate change to make.

A minor nit-pick about the C++ code is that a member function
(even a static member function) is not quite the same as a C
function; technically, passing a pointer to such a function
can break. You should instead pass the function in as an
{extern "C" { ... }} construct, in order to be perfectly
correct. This makes C++ code that wants to use a class
function to handle callbacks from C code a little messy.