How to redraw the picture while moving windows in openGL?

Posted by tsubasa on Stack Overflow See other posts from Stack Overflow or by tsubasa
Published on 2010-03-20T21:24:21Z Indexed on 2010/03/21 14:01 UTC
Read the original article Hit count: 418

Filed under:
|
|
|

I have drawn a picture with openGL on my windows. Now whenever I hold the mouse button on the windows and move it, my picture always got distorted. I don't know what function in openGL that can help me redraw the picture while the windows is moved. Anybody could help?

I tried this but seems not work:

void myDisplay()
{
   .....
}

void reshape(int x, int y)
{
   glutPostRedisplay();
}

int main()
{
   .....
   glutDisplayFunc(myDisplay);
   glutReshapeFunc(reshape);
}

© Stack Overflow or respective owner

Related posts about c++

Related posts about programming