SFML community forums
Help => Window => Topic started by: Firefly on February 19, 2010, 02:59:36 am
-
I'm wondering if SFML can handle the creation of two or more windows?
I need to create two windows and thus get two window handles (HWND) so that I can pass these to my DirectX renderer which uses them to setup SwapChains for multi-monitor/window rendering.
It isn't possible with SDL, but I'm *hoping* it can be done with SFML.
-
It is possible to have multiple windows, but SFML windows are meant for OpenGL rendering. And, they don't give access to their internal HWND (but you can easily hack the code to make it accessible).
If you want to use DirectX, why don't you create your windows with Win32 code directly, or using DXUT?
-
Because I am creating a cross-platform engine and don't want to handle the window creation myself. Therefore I'd need access to the HWND's to send to my DX renderer, etc.
-
A cross-platform engine with DirectX? Sounds weird. ;)
-
I presume he meant graphic API-independent engine using some SFML functionality.
-
Yes that is what I meant. I will have a DX renderer and an OGL renderer, or whatever else - it uses an API independent plugin system.
But anyway, apparently with some hacks I can get the HWND's? If I end up going down the track of supporting dual monitors then I might give it a go.
Thanks.