Can I have three windows on one process?

Im a bit confused as to whether or not I can (or have to) have a separate process for each window (I have four windows; one is the main window (which will not have any on-going rendering) and three others which will have rendering for each frame.

Thank you

Mark Allyn

In SDL2 and SDL3 multiple windows are fully supported from a single “process”, no need to pipe/tunnel/hook or otherwise pass information between separate programs. Now, this does mean that you will need a separate renderer per window, and it does slightly add to the single-window complexity as you deal with your event processing (for most events you’ll want to check which window it stems from in order to deal with them appropriately: using the event.windowID field like you see in the keyboard event).

The Lazyfoo tutorials have a multiple window tutorial, though they use C++, it could be done using structs if you wanted to keep it pure C. Be sure to pay close attention to that tutorial, as having multiple windows causes a change to when the SDL_QUIT event gets fired.

Hope that helps?

Thank you. This answers my question. I am doing a multi screen oscilloscope where all inputs are from sound sources. There are no buttons or enything else that will cause envents to happen. I will have a thread to deal with the devices; that thread will use a mutex and shard data with the main process.

Mark