prashantgp
02-18-2003, 11:36 PM
Hi all ,
i am creating 2 windows.
one is the subwindow of the other.
when i maximise the parent window ,
the child window is not getting maximised.
how to do it??
my reshape code looks like this.
void
reshape (int w, int h)
{
glViewport (0, 0, (GLsizei) w, (GLsizei) h);
glMatrixMode (GL_PROJECTION);
glLoadIdentity ();
gluOrtho2D (-1.0, 1.0, -1.0, 1.0);
glMatrixMode (GL_MODELVIEW);
glLoadIdentity ();
}
and main function looks like this.
int
main (int argc, char **argv)
{
glutInit (&argc, argv);
glutInitWindowSize (800, 725);
glutInitWindowPosition (200, 80);
pw = glutCreateWindow ("Multi Function Display");
glutInitDisplayMode (GLUT_DOUBLE | GLUT_RGB | GLUT_DEPTH);
init ();
glutDisplayFunc (display);
glutKeyboardFunc (keyboard);
glutReshapeFunc (reshape);
glutMouseFunc (mouse);
// Default page - Attitude direction indicator
cw = glutCreateSubWindow (pw, 120, 110, 550, 510);
cinit ();
glutDisplayFunc (cdisplay);
glutReshapeFunc (reshape);
glutKeyboardFunc (keyboard);
glutMouseFunc (mouse);
glutIdleFunc (idle);
glutMainLoop ();
return 0;
}
pls do reply soon,
bye bye
i am creating 2 windows.
one is the subwindow of the other.
when i maximise the parent window ,
the child window is not getting maximised.
how to do it??
my reshape code looks like this.
void
reshape (int w, int h)
{
glViewport (0, 0, (GLsizei) w, (GLsizei) h);
glMatrixMode (GL_PROJECTION);
glLoadIdentity ();
gluOrtho2D (-1.0, 1.0, -1.0, 1.0);
glMatrixMode (GL_MODELVIEW);
glLoadIdentity ();
}
and main function looks like this.
int
main (int argc, char **argv)
{
glutInit (&argc, argv);
glutInitWindowSize (800, 725);
glutInitWindowPosition (200, 80);
pw = glutCreateWindow ("Multi Function Display");
glutInitDisplayMode (GLUT_DOUBLE | GLUT_RGB | GLUT_DEPTH);
init ();
glutDisplayFunc (display);
glutKeyboardFunc (keyboard);
glutReshapeFunc (reshape);
glutMouseFunc (mouse);
// Default page - Attitude direction indicator
cw = glutCreateSubWindow (pw, 120, 110, 550, 510);
cinit ();
glutDisplayFunc (cdisplay);
glutReshapeFunc (reshape);
glutKeyboardFunc (keyboard);
glutMouseFunc (mouse);
glutIdleFunc (idle);
glutMainLoop ();
return 0;
}
pls do reply soon,
bye bye