   Process priority
  I'm new here and sorry if i got the wrong forum but my problem doesn't really fit anywhere else.I don't need help fixing code or anything.I'm working on a simple 3d shooter that is a project for my Uni. Its created in opengl (didn't have a choice) and i was crazy enough to want to use a WiiMote for it. now my problem is this. I got the wiimote to work BUT in order to use the Ir tracking and accelerometer i need to make the update function for the wiimote run constantly but if i do that it overrides the rendering and basically everything else. SO my question is how can i get the UPDATE function to update properly without overriding everything else?I don't necersarely want code but if someone could point me in the right direction i would very much apreciate it and you would contribute to the NGD (Nintendo Going Down) Project.   
Quote:Original post by AshairaI'm new here and sorry if i got the wrong forum but my problem doesn't really fit anywhere else.I don't need help fixing code or anything.I'm working on a simple 3d shooter that is a project for my Uni. Its created in opengl (didn't have a choice) and i was crazy enough to want to use a WiiMote for it. now my problem is this. I got the wiimote to work BUT in order to use the Ir tracking and accelerometer i need to make the update function for the wiimote run constantly but if i do that it overrides the rendering and basically everything else. SO my question is how can i get the UPDATE function to update properly without overriding everything else?What do you mean "run constantly"? How many times a second do you need to call it? And what do you mean by "overriding"?The two obvious choices are: (1) Call the update function once a frame. (2) Run a separate thread dedicated to reading the input very frequently.If I understand it correctly, you are saying that (1) won't work, although that's hard to imagine.;  the way my game works right now is that every class gets updated based on a timer problem is if i run the udate for the Wiimote within a while loop "while(1){}" makes it update right but every other class doesn't update or sometimes they get updated extremely slow. if i take the while loop out then it doesn't update fast enough (only the buttons work but not the IR tracking and ACC).   ;  I wasn't aware of threading. looks like it will solve my problem. I'm looking into it now.   ;  Polling is never a good way to address an input device...Anyway to handle it like a mouse? IE get an interrupt whenever the mote is moved?   