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

Author Topic: Multithreading question  (Read 1771 times)

0 Members and 1 Guest are viewing this topic.

slotdev

  • Sr. Member
  • ****
  • Posts: 385
    • View Profile
Multithreading question
« on: October 18, 2013, 03:13:11 pm »
Hi

I should know the answer to this, but I don't.

If I launch a thread from within my SFML app, and open a new window, load graphics, etc, is this effectively a new instance of SFML? So everything is separate from the main thread which has it's own windows etc.

Thanks!
SFML 2.1

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: Multithreading question
« Reply #1 on: October 18, 2013, 03:30:35 pm »
There's no "instance" of SFML. So yes, everything is separate, except that there are a few globals internally (especially about OpenGL context management) that will always be shared.
Laurent Gomila - SFML developer

slotdev

  • Sr. Member
  • ****
  • Posts: 385
    • View Profile
Re: Multithreading question
« Reply #2 on: October 18, 2013, 10:24:11 pm »
Thanks Laurent, I thought as much.

After the saga of trying to use 3 monitors, 1 on another video card - I have it (almost) working, but I can only get 5fps out of the 2nd video card. Why can't life be simple and things just work.....
SFML 2.1

 

anything