Skip to main content
edited tags
Link
Vaillancourt
  • 16.4k
  • 17
  • 55
  • 61
replaced http://gamedev.stackexchange.com/ with https://gamedev.stackexchange.com/
Source Link

I'm trying to make a game with freeglut, but im still learning it and I don't fully understand what the looping does or whether I have to call it myself,

I've already read this article A good way to build a game loop in OpenGLA good way to build a game loop in OpenGL and didn't understand the answers

I get that glutmainloop() will call whatever I set in glutdisplayfunc() but I don't know how often or where I should put the game loop code

So my question is Where do I put the game loop code and how do I call it?

I'm trying to make a game with freeglut, but im still learning it and I don't fully understand what the looping does or whether I have to call it myself,

I've already read this article A good way to build a game loop in OpenGL and didn't understand the answers

I get that glutmainloop() will call whatever I set in glutdisplayfunc() but I don't know how often or where I should put the game loop code

So my question is Where do I put the game loop code and how do I call it?

I'm trying to make a game with freeglut, but im still learning it and I don't fully understand what the looping does or whether I have to call it myself,

I've already read this article A good way to build a game loop in OpenGL and didn't understand the answers

I get that glutmainloop() will call whatever I set in glutdisplayfunc() but I don't know how often or where I should put the game loop code

So my question is Where do I put the game loop code and how do I call it?

Post Closed as "exact duplicate" by Nicol Bolas, bummzack, Sean Middleditch, user1430, House
Source Link

Free glut game loop

I'm trying to make a game with freeglut, but im still learning it and I don't fully understand what the looping does or whether I have to call it myself,

I've already read this article A good way to build a game loop in OpenGL and didn't understand the answers

I get that glutmainloop() will call whatever I set in glutdisplayfunc() but I don't know how often or where I should put the game loop code

So my question is Where do I put the game loop code and how do I call it?