Actually I have pasted code for 2 windows only, the thrid is repration like mean curve till glPUSHMATRIX . Even with 2 window I am getting same error. Am I missing some command or step which is causing the problem only in first window