I have a C++ class that contains the draw function that I want to pass to glutDisplayFunc(). glutDisplayFunc takes a function pointer (void (*)() ) as its argument. I have tried :
Model myModel(pathToTextures);
//Model contains the Draw function that draws the vertices and the textures
std::function<void(void)> myfunc=std::bind(&Mymodel::Draw,&modelna);
glutDisplayFunc(myfunc);
the compiler cannot convert the std::function pointer to the required. how can I bypass this hurdle of member function pointer?