Interacting with multiple windows

with the glfw3 I could subdivide the viewport into 4. However, the viewport also use mouse-interaction. When I am running the program, viewports are opening serial way and let me interact only the current one. For example, running the program opens the bottom left viewport, with mouse interaction. When I am stopping this viewport (x) the second one (top left ) is opening and allow mouse interaction. the previous viewport (bottom left) is froze that time.

I want something like all these viewport will open at once, and if I interact with any of these viewports with mouse, the interaction will be visible in all other three viewports. After all, the camera, light, and other parameters are same. Could you please pass any suggestion?

Hi @bipul-mohanto,

Welcome to the GLFW forum. I have moved your post to a new thread as it is a separate issue from creating multiple windows.

To create all your windows at once simply create the windows before running your main application loop.

In order to see the interaction in all the windows you will need to render all windows and ensure that the data you want to see being interacted with is shared. How to do this depends on your application and what you are trying to interact with.

For a simple multiple window example see examples/windows.c

For a more complex multiple window example with shared OpenGL context see examples/sharing.c

If you still have issues please write a bit more about the interaction you are trying to view. It would also be helpful if you have your code publicly available on Github or another site.



1 Like