Jump to content

  • Log In with Google      Sign In   
  • Create Account

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: 294

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: 31790

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: 294

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: 14219

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
It is amazing how often people try to be unique, and yet they are always trying to make others be like them. - L. Spiro 2011
I spent most of my life learning the courage it takes to go out and get what I want. Now that I have it, I am not sure exactly what it is that I want. - L. Spiro 2013
I went to my local Subway once to find some guy yelling at the staff. When someone finally came to take my order and asked, “May I help you?”, I replied, “Yeah, I’ll have one asshole to go.”
L. Spiro Engine: http://lspiroengine.com
L. Spiro Engine Forums: http://lspiroengine.com/forums




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