glPushMatrix ();
glLoadIdentity ();
glColor3ub ( 0, 0, 0 );
- glRasterPos2i ( 10, glutGet ( GLUT_WINDOW_HEIGHT ) - 10 );
+ glRasterPos2i ( 10, glutGet ( GLUT_WINDOW_HEIGHT ) - 20 ); /* 10pt margin above 10pt letters */
if ( reshape_called )
{
/* print warning message */
vprintf(fmt, ap);
- /* deInitialize the freeglut state */
- /* This all goes haywire of course when the error occurs during deinitialize,
- * one might want to call exit directly as its possible freeglut is messed
- * up internally when error is called.
- */
- printf("Error callback: calling glutExit() to prepare for clean exit\n");
- glutExit();
-
- /* terminate program */
+ /* terminate program, after pause for input so user can see */
printf ( "Please enter something to exit: " );
fgets ( dummy_string, STRING_LENGTH, stdin );
+ /* Call exit directly as freeglut is messed
+ * up internally when an error is called.
+ */
exit(1);
}
reshape_width = width ;
reshape_height = height ;
reshape_seq = sequence_number ;
+ glViewport(0,0,width,height);
glutPostRedisplay () ;
}