Using OpenGL glutDisplayFunc within class

后端 未结 4 764
清歌不尽
清歌不尽 2020-12-04 16:13

I\'ve created a C++ class (myPixmap) to encapsulate the work performed by the OpenGL GLUT toolkit. The display() member function of the class cont

4条回答
  •  广开言路
    2020-12-04 16:23

    Merlyn solution didnt work for me, so I made a little modification by bringing currentInstance outside of class and it worked:

    Class myPixmap;
    static myPixmap* currentInstance;
    Class myPixmap {
    ...
    }
    

提交回复
热议问题