   gutTimerFunc()
  Hi guys has any one used glutTimerFunc(); i have found loads of sites using this and i could do with it but openGl cant find it, all the sites have the following includes but it is not included in them. Any ideas?  thank you i need this as i am making a turret fire a stream of bullets but have the fire function called every so milli seconds.#include <stdio.h>#include <stdlib.h>#include <GLUT/glut.h> //thank you   
  http://pyopengl.sourceforge.net/documentation/manual/glutTimerFunc.3GLUT.htmlI am not following you. Do you want to know where to get it, or how to use it? You need to download glut library to use glut code. Google it and then add it to your compiler paths.   ;  Hi sorry, what i mean is i know how to use it but when i add it in OpenGl cant find it anywhere but i will have a look on that site. Thank you   ;  OpenGL won't be able to "find" it, since it isn't an OpenGL function. It's a GLUT function. You need to use GLUT to be able to use it. That is, you need to include the GLUT header AND you need to be using the GLUT main loop AND you need to link with the GLUT library file.   ;  If you need to delay here is a simple function:#include <time.h>void delay(int ms){   int start;   start=clock();   while(clock()-start<=ms);  };;Quote:Original post by crestyIf you need to delay here is a simple function:*** Source Snippet Removed ***Using that in a GUI-based Windows application, where you may be executing from the message loop, is a terrible idea because it'll avoid receiving system messages. Fine for non-IoC console apps, though.   ;  thank you. I got it to work now, it a good function, wish i knew of it before rather than making the proc check the distance of the prevous bullet from the turret before firing the next. Noob way lol especially calculating it for 3d space.Thanks Guys   