| 1 | from pyglet.gl import * |
| 2 | |
| 3 | |
| 4 | def draw_client_border(window): |
| 5 | glClearColor(0, 0, 0, 1) |
| 6 | glClear(GL_COLOR_BUFFER_BIT) |
| 7 | |
| 8 | glMatrixMode(GL_PROJECTION) |
| 9 | glLoadIdentity() |
| 10 | glOrtho(0, window.width, 0, window.height, -1, 1) |
| 11 | |
| 12 | glMatrixMode(GL_MODELVIEW) |
| 13 | glLoadIdentity() |
| 14 | |
| 15 | def rect(x1, y1, x2, y2): |
| 16 | glBegin(GL_LINE_LOOP) |
| 17 | glVertex2f(x1, y1) |
| 18 | glVertex2f(x2, y1) |
| 19 | glVertex2f(x2, y2) |
| 20 | glVertex2f(x1, y2) |
| 21 | glEnd() |
| 22 | |
| 23 | glColor3f(1, 0, 0) |
| 24 | rect(-2, -2, window.width + 2, window.height + 2) |
| 25 | |
| 26 | glColor3f(0, 1, 0) |
| 27 | rect(1, 1, window.width - 2, window.height - 2) |