Original Post
I have a active object that includes all the 'rendering' for my game. When I want to 'do something' graphical, I write a little function, then send a callback request to this graphics active object. All callback requests sent to the active object go into a little queue, and are processed fifo style, on the active objects own thread. The problem is, how can you store all these functors/callbacks in the queue? I mean, it works great when were just calling nullary functions (they can all fit in one list), but what about a callback that needs some kind of argument (of X type)? So, my question is, how can I pass arguments (of all diferent types) to this active object, have the arguments buffered somewhere, then passed along to the function? Thanks for any insight *keep in mind performance is a huge concern. I did find a solution using boost bind, but it was far to slow to bind every callback request at runtime.