Jump to content

  • Log In with Google      Sign In   
  • Create Account

Banner advertising on our site currently available from just $5!


1. Learn about the promo. 2. Sign up for GDNet+. 3. Set up your advert!


glfwPollEvents on It's own Thread?


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
3 replies to this topic

#1 tmason   Members   -  Reputation: 326

Like
0Likes
Like

Posted 10 June 2014 - 07:41 PM

Hello,

 

Not sure if this is a silly question or not but has anyone tried putting a function wrapper around glfwPollEvents() in it's own thread via an std::thread or similar?

 

Just curious if it can be done and what experience people may have had with that.

 

Thank you for your time.



Sponsor:

#2 Hodgman   Moderators   -  Reputation: 37927

Like
1Likes
Like

Posted 10 June 2014 - 08:49 PM

I don't know about other platforms, but on Windows, that call has to be in the same thread that created the window.



#3 tmason   Members   -  Reputation: 326

Like
0Likes
Like

Posted 10 June 2014 - 08:52 PM

I don't know about other platforms, but on Windows, that call has to be in the same thread that created the window.

 

I see, makes sense. Was just trying to speed up and offload polling of the keyboard/mouse.



#4 L. Spiro   Crossbones+   -  Reputation: 18132

Like
4Likes
Like

Posted 10 June 2014 - 09:37 PM

Wrong direction. It’s not the input that gets shoved off to another thread, it’s the game loop that gets the shove.


L. Spiro




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS