I have a class that has functionality to initialize opengl and runs it in a separate thread.
My problem: openGL calls like glutDisplayFunc, glutMotionFunc etc. void (* f) void, and I cannot pass a member function to a class.
. 1) I can declare a member function as static, but in this case I need to declare all used member variables as static and ultimately declare the whole class as static.
2) I can use some autonomous function and declare my object global, but this is too bad.
I wonder if there are any ways, so I donβt need to set the opengl static class? (using C ++)
c ++ static opengl
kirbo
source share