0

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?

Ricko
  • 5
  • 1
  • 5

1 Answers1

0

I suppose asmjit library could do that for you.

Bartek Banachewicz
  • 38,596
  • 7
  • 91
  • 135