Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Multiple Windows  (Read 3396 times)

0 Members and 1 Guest are viewing this topic.

Firefly

  • Newbie
  • *
  • Posts: 3
    • View Profile
Multiple Windows
« 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.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Multiple Windows
« Reply #1 on: February 19, 2010, 09:21:36 am »
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?
Laurent Gomila - SFML developer

Firefly

  • Newbie
  • *
  • Posts: 3
    • View Profile
Multiple Windows
« Reply #2 on: February 22, 2010, 05:25:14 am »
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.

Tank

  • SFML Team
  • Hero Member
  • *****
  • Posts: 1486
    • View Profile
    • Blog
    • Email
Multiple Windows
« Reply #3 on: February 22, 2010, 11:07:26 am »
A cross-platform engine with DirectX? Sounds weird. ;)

dunce

  • Jr. Member
  • **
  • Posts: 77
    • View Profile
Multiple Windows
« Reply #4 on: February 22, 2010, 03:00:00 pm »
I presume he meant graphic API-independent engine using some SFML functionality.

Firefly

  • Newbie
  • *
  • Posts: 3
    • View Profile
Multiple Windows
« Reply #5 on: February 22, 2010, 11:11:19 pm »
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.

 

anything