່ ຽນຂະໜ າດ void reshape(int w, int h) { glViewport(0,0,w,h); if (w == 0) w = 1; if (h == 0) h = 1; double aspect = w * 1.0 / h; glMatrixMode(GL_PROJECTION); glLoadIdentity(); if (w > h) gluOrtho2D(-aspect, aspect, -1, 1); else gluOrtho2D(-1, 1, -1/aspect, 1/aspect); } ກ ັ ນ division by zero