The kind of OpenGL windowing that I refer to is like GLFW, GLUT, SDL, etc.
Imagine three C++ programs: (ignore syntax)
class Game resize() keyEvent()
class Key event() class Display resize()
In A, everything is in one class, in B nothing is in a class, and in C the two events have their own classes. Another that is not shown is subclassing a provided 'Game' class that has predefined functions overloaded.
I would like any reasonable means that can allow the main library to delegate out to each of these three cases. The solution should not require separate storage of a 'this' parameter.
I have thought of a couple of ideas, one is a way of mapping the function in a functor. Another was lambdas. Lambdas are not okay, because they are not widely implemented yet. (Compilers of choice are VC 2010, gcc (latest stable), and Apple's clang).
Any new C++ 2011 features that are widely implemented are reasonable thoughts.
A gentleman at the local university suggested something similar to the functor, but I cannot remember the function he was talking about.