0
\$\begingroup\$

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?

\$\endgroup\$
5
  • \$\begingroup\$ Spencer, did you see the link that was provided in your previously closed question about this? gamedev.stackexchange.com/questions/8623/… \$\endgroup\$
    – Inisheer
    Commented Mar 29, 2013 at 21:35
  • \$\begingroup\$ Yes, that's the link I have posted in this post it doesn't really fully explain the glutmainloop and it's more about setting a timestep \$\endgroup\$
    – Jim Jones
    Commented Mar 30, 2013 at 1:00
  • \$\begingroup\$ @SpencerKillen: Of course it didn't fully explain the glutMainLoop; It specifically said not to use GLUT. That's your answer: Stop using FreeGLUT and switch to something else if you're making a game \$\endgroup\$ Commented Mar 30, 2013 at 3:23
  • \$\begingroup\$ if its so bad why are there so many tutorials for game dev using it? \$\endgroup\$
    – Jim Jones
    Commented Mar 30, 2013 at 5:25
  • 1
    \$\begingroup\$ because it's been around for quite some time, although that doesn't say anything about the quality or usablity \$\endgroup\$
    – cppanda
    Commented Mar 30, 2013 at 14:20

0

Browse other questions tagged .