// À©µµ¿ì Ãâ·Â ÇÔ¼ö GLvoid drawScene(GLvoid) { glClearColor(0.0f, 0.0f, 0.0f, 1.0f); // ¹ÙÅÁ»ö ÁöÁ¤ glClear(GL_COLOR_BUFFER_BIT); // ¼³Á¤µÈ »öÀ¸·Î †Ã¼¸¦ Ä¥Çϱâ // »ö»ó ÁöÁ¤ÇÏ°í »ç°¢Çü ±×¸®±â if (rectexist) { glColor4f(1.0, 5.0, 0.0, 1.0f); glBegin(GL_POLYGON); glVertex2i(rectpt.x, rectpt.y + RectSize); //v1 glVertex2i(rectpt.x, rectpt.y); //v2 glVertex2i(rectpt.x + RectSize, rectpt.y); //v3 glVertex2i(rectpt.x + RectSize, rectpt.y + RectSize); //v4 glEnd(); } for (itor = shapes.begin(); itor != shapes.end(); itor++) { itor->Draw(); } glFlush(); // ȸ鿡 Ãâ·ÂÇϱâ }
// À©µµ¿ì Ãâ·Â ÇÔ¼ö GLvoid drawScene(GLvoid) { glClearColor(0.0f, 0.0f, 0.0f, 1.0f); // ¹ÙÅÁ»ö ÁöÁ¤ glClear(GL_COLOR_BUFFER_BIT); // ¼³Á¤µÈ »öÀ¸·Î †Ã¼¸¦ Ä¥Çϱâ // »ö»ó ÁöÁ¤ÇÏ°í »ç°¢Çü ±×¸®±â glEnable(GL_BLEND); glColor4f(0.0, 0.0, 0.0, 0.5f); glRectf(0, 0, Window_Width, Window_Height); glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_COLOR); for (itor = madurai.begin(); itor != madurai.end(); itor++) { itor->Draw(); } glDisable(GL_BLEND); glFlush(); // ȸ鿡 Ãâ·ÂÇϱâ }