SFML community forums
Help => Window => Topic started by: xerzi on August 29, 2014, 08:02:44 am
-
Is there a way to construct a new window using the same context as another window?
-
You can get the native window handle with window.getSystemHandle(). From there you can use any Win32/GDI function that you need (GetDC, etc.). But remember that SFML uses OpenGL. I don't know what you want to do with GDI contexts, but it may not work as expected.
-
Well i am trying to use a single context (with all my loaded resources and such) to render to two different SFML, i'd just have to call the glMakeCurrent and SwapBuffers myself, and there'd just be an extra context created in the other sfml window?
-
SFML contexts are all shared, you don't need to do anything.