It just won't draw

Hi, I am a beginner to the OpenGL stuff and I’ve got a small but tricky problem. I’m probably missing something obvious, and I apologise if the answer is in a FAQ somewhere…anywho, here we go.

The problem is getting the window to refresh, ie. update the image, when I want it to. I know the code is working resonably well because changing the size of the window causes the new image to be displayed.

I just can’t get it to happen without user intervention.

I’m using GLUT on Irix (a unix-type thing) and also Linux (SuSE) in various versions.

Here is my display callback:

void display(void)
/* Clear all pixels */

glDrawPixels(width, height, GL_RGB, GL_UNSIGNED_BYTE, image);


The glutSwapBuffers and glFinish calls are just my desparate attempts to get it to work. Double buffering is not vital and I’ll be happy to do without it…

Can somebody help me??? Please!!!

PS. I AM using glutPostRedisplay at the point where I want the display updated (just after the image array has been filled in).

Actually, I have the exact same problem!

I try to refresh the screen after mouse input using glutPostRedisplay(), it just draws right over what’s already there. But if I minimize it and then expand it, it refreshes.

Someone please help

if you need to do continuous animation, then tell glut to use display as idle function also:


or something like that. i don’t use glut in a while.

also, there’s not the need to call glFinish(), swapbuffers implicitely does it yet, and if there’s no back buffer glutSwapBuffer won’t prevent things to work properly.


[This message has been edited by dmy (edited 04-14-2000).]