i'm currently trying to gather as much information on input systems as possible.
In order to this i looked up some different libraries like GLFW and SDL.
While getting in touch with them, i noticed that it is required to have an instance of a window to actually gain input information from the underlaying OS via that libraries.
So here is my question(s):
Would you call it a bad practice if one would try to gain input information directly from the OS even if there is no window instance? (the input system should run fine without a window to do its job)
The game itself would then decide whether to handle the input event that is emited by the input system or not because it has some knowledge about the window it is running in.
If the window of the game has focus then the event would be handled. If the window has no focus then the event would be consumed or whatever but not handled.
If doing so - are there any pitfalls one would have to deal with while the project is growing?
What are typical approaches in commercial products to do things like this?
I really appreciate any information on this subject.
Thank you in advance.