This question has been asked before multiple times, but as a beginner I have found the various answers rather hard to interpret.
I want to call my member function SetFrameBufferSize() from the glfwSetFramebufferSizeCallback() function (from inside my other member function SetFramebufferSizeCallBack()). The problem, as has been detailed before, is that the glfwSetFramebufferSizeCallback() function will not take a member function as a parameter. I can solve this problem by abstracting the SetFrameBufferSize() function outside the GLFW class, and I have done this with the SetTheFrameBufferSize() function which works fine. But I would much prefer to have this function inside the class. Is there anyway that this can be done, and if so, would the respondent be so kind as to talk me through the steps required to achieve this.
void GLFW::SetFrameBufferSize(GLFWwindow* window, int h, int w)
{
// Resize window
}
void SetTheFrameBufferSize(GLFWwindow* window, int h, int w)
{
// Resize window
}
void GLFW::SetFrameBufferSizeCallBack()
{
glfwSetFramebufferSizeCallback(m_Window, SetTheFrameBufferSize); // works fine
glfwSetFramebufferSizeCallback(m_Window, GLFW::SetFrameBufferSize);
/* argument of type "void (GLFW::*)(GLFWwindow* window, int h, int w)" is incompatible
with parameter of type "GLFWframebuffersizefun" */
}