why do you trigger a repaint in the repaint? >>
without QTimer::singleShot(0, this, SLOT(updateGL()))
paintGL() Func is not repaint in this case
@void Display::paintGL()
{
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
glClearColor(0.0, 0.0, 0.0, 1.0);
glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
static int Angle = 0;
++Angle;
glPushMatrix();
glRotatef(Angle, 0.0f, 0.0f, 1.0f);
glBegin(GL_QUADS);
glVertex3f(-0.5, 0.0, -0.5);
glVertex3f( 0.5, 0.0, -0.5);
glVertex3f( 0.5, 0.0, 0.5);
glVertex3f(-0.5, 0.0, 0.5);
glEnd();
glPopMatrix();
}@
where exactly does it crash? >>
it is not crash all the time
and it's crash point is not same all the time
and this crash is fixed QTimer::singleShot Func's msec value change (0 -> 10)
By the way, a side not to your first post>>
I'm sorry. and thank you for your Advice Gerolf :)
and thank you all. dude!