Window not updating unless dragged (GLUT/C++)

I’ve written a program in C++ that uses GLUT/OpenGL to render solids taken from a small script. The camera is supposed to rotate around the center of the prefab, so the window should be animated, right? However, the only way I can get the window to update is by dragging it. Or, I assume, sending any event to the window.

At first I assumed there was something wrong with my code, and was curious as to why it was not working despite having an idlefunc and getting it set up properly. I shared the executable with my friend, however, and the program worked as it was intended.

What could be causing the problem on my machine? I’m assuming it’s a problem with my computer as even tutorial code written by others had the same problems.

I can’t link a gifs/videos (because of a link limit on new accounts) of what is happening on my machine vs. my friend’s on this thread but I’ll see if I can put them in a reply.

Maybe glutPostRedisplay ?

Beth641, please explain what you mean in more detail. Your reply is confusing.

First, what do you mean by “complete research is important”? How does that help the original poster?

And second, glutPostRedisplay does not “cause” the problem. That’s not what Silence is saying.

My answer can be confusing… But yes, I hoped it would solve the problem.

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.