HI,
I see that for the widget 1 happen (in this order):
initializeGL()
resizeGL()
resizeGL()
paintGL()
resizeGL()
resizeGL()
paintGL()
paintGL()
This is for a widget! Is this strange?
void MyWidget::resizeGL( int w, int h )
{
cout << "resize" << this << endl;
// setup viewport, projection etc.:
glMatrixMode (GL_PROJECTION);
glLoadIdentity ();
GLdouble ratio=((GLdouble)w)/(GLdouble)h;
gluPerspective(45,ratio,3,40);
glViewport (0, 0, (GLdouble) w, (GLdouble) h);
glMatrixMode (GL_MODELVIEW);
glLoadIdentity ();
}
void MyWidget::resizeGL( int w, int h )
{
cout << "resize" << this << endl;
// setup viewport, projection etc.:
glMatrixMode (GL_PROJECTION);
glLoadIdentity ();
GLdouble ratio=((GLdouble)w)/(GLdouble)h;
gluPerspective(45,ratio,3,40);
glViewport (0, 0, (GLdouble) w, (GLdouble) h);
glMatrixMode (GL_MODELVIEW);
glLoadIdentity ();
}
To copy to clipboard, switch view to plain text mode
Bookmarks