PDA

View Full Version : Window not updating unless dragged (GLUT/C++)



toads_tf
10-09-2016, 11:11 PM
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.

Silence
10-10-2016, 12:21 AM
Maybe glutPostRedisplay (https://www.opengl.org/resources/libraries/glut/spec3/node20.html) ?

Dark Photon
10-10-2016, 06:25 AM
yes. you are right. it causes the problem.. but complete research is important

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.

Silence
10-10-2016, 07:13 AM
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.