PDA

View Full Version : GLUT application freeze



pandicacao
08-03-2016, 11:19 AM
I am developing my own game engine from scratch using c++, opengl and glut. My engine is working perfectly at my computer but recently I have bought a new laptop and I decided to develop my project on the new machine too. Here comes the really weird moment. With the exact same code when I run the application on my laptop it seems to respond only if I am holding any of the mouse buttons or if I switch focus to another window. The engine has first person movement system and firstly I observed that I am moving only if I hold any mouse button despite the fact that I don't have glutMouseFunction(). Then I alt+tab the application and saw a slight difference in the view - thus the camera has moved. With the esc key the application must close but when I click esc it only closes after a mouse click. So I concluded that the whole application responds only under these circumstances and I proved that by putting cout - s in each callback function. The effect was the same. Something was printed to the console only if a mouse button is being held or when another window is in focus. I don't have any idea what could cause the problem. If anyone has any ideas I will appreciate the help.