I have a
void __fastcall TPVPLForm::GLP2DResize(TObject Sender)
{
width=(GLsizei)GLP2D->Width;
height=(GLsizei)GLP2D->Height;
glViewport(0,0,width,height);
maxx=maxy(width/height);
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
glOrtho(minx,maxx,miny,maxy,-1.0,1.0);
glPushMatrix();
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();
}
But whenever I change minx,maxx,miny,maxy
nothing happens the drawing does not zoom
when I call Repaint but retains the values
that were first given when the program
started. Wht could be causing this?
Regards Digby Millikan.
Originally posted by Digby: I have a
void __fastcall TPVPLForm::GLP2DResize(TObject *Sender)
{
…
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
glOrtho(minx,maxx,miny,maxy,-1.0,1.0);
glPushMatrix();
glMatrixMode(GL_MODELVIEW);
…
}
.
Hi
maybe glPushMatrix on each window resizing causes projection matrix stack overflow.
[This message has been edited by Michail Bespalov (edited 03-21-2001).]