ok say I have
void Render(void(*Call)())
{
D3dDevice->BeginScene();
Call();
D3dDevice->EndScene();
D3dDevice->Present(0,0,0,0);
}
This is fine as long as the function I want to use to render is a function or static class method
Render(MainMenuRender);
Render(MainMenu::Render);
However I really want to be able to use a class method as well since in most cases the rendering function will want to access member varribles, and Id rather not make the class instance global...eg
Render(MainMenu->Render);
However I really have no idea how to do this, and still allow functions and static methods to be used.