When only the main window is created, the fps is able to reach above 1000.However creating 1 more window, resulted in the fps dropping significantly down to about 100. The draw callback draws a blank black screen and writes the fps onscreen.
Q1) What is the reason behind the sharp drop in fps?
Q2) Any possible ways to improve on this fps?
int main(void){
int mainwindow,otherwindow1;
glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGB);
glutInitWindowSize(640,480);// set the initial window size
glutInitWindowPosition(0,300);//set the initial window position
mainwindow = glutCreateWindow("main window");
glutDisplayFunc(Draw);
glutReshapeFunc(ChangeWindowSize);
otherwindow1 = glutCreateWindow("Other window");
glutDisplayFunc(Draw);
glutReshapeFunc(ChangeWindowSize);
setVsync(0);
glutMainLoop();
}
void Draw(){
glClearColor(0.0f, 0.0f, 0.0f, 1.0f);
glClear(GL_COLOR_BUFFER_BIT);
getFPS();
glutPostRedisplay();
glutSwapBuffers();
}