SDL2 + Multiple Windows and focus

Started by
1 comment, last by Aldacron 8 years, 8 months ago

Hi guys,

A quick question with respect to SDL2 before I start making a window class.

I would like to have one window doing a simulation, and another specifically for rendering information, such as statistics regarding the simulation at the same time.

Is it possible to build two windows in SDL2, where both are active (have focus) at the same time, or will I be only able to view one?

Thanks,

Mike

Advertisement

Yes, it's possible to have multiple windows. They can even be on different displays.

Pieter

Only one window can ever have focus at a time. That's nothing to do with SDL and it doesn't affect rendering. You can render to multiple windows simultaneously just fine. Only the window with focus will receive input events, though.

This topic is closed to new replies.

Advertisement