I am developing an app using ImGui and GLFW, however I don't know how to get the Window size properly.
I do know that the glfwGetWindowSize
does exist however I don't really understand how it works specifically the int and width params.
I have tried: initializing int* w
and int* h
and plugging those in the function. However that didn't work.
Have you tried using something like this:
int width, height;
glfwGetWindowSize(window, &width, &height);
where window is your window instance. But if you are having problems with pointers then you should do as the comment suggested. However if you want to use pointers try this:
int* width = new int(0);
int* height = new int(0);
glfwGetWindowSize(window, width, height);
//do stuff with the values
delete width;
width = nullptr;
delete height;
height = nullptr;
//this will delete the value and delete the pointer