nobody wrote on Friday, April 14, 2006:
I’m using GLFW to write a simple OpenGL game for a class project that I’m working on. I finally managed to seperate GLFW and my OpenGL code into seperate C++ classes without anything breaking. (for modularity reasons, that’s the point of this class project)
What I’ve run into now is the setWindowResizeCallback() and setWindowRefreshCallback() functions.
I need to know if it’s possible to define
void GLFWCALL resize(int newWidth,int newHeight);
void GLFWCALL refresh();
inside the class so they can use the pointer the class has to the graphics module to tell OpenGL what it needs to do. This is the last OpenGL code in my GLFW module.
I’m not sure what GLFWCALL is here, but when I try doing
void GLFWCALL GLFWrapper::refresh()
I get this error:
"void (GLFWrap::)() does not match void(*)()"
I tried making them friend functions outside of the class, but then I need some way to pass the correct instance of the object to them and I don’t think that’s possible.
Any help would be appreciated.