summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--main.cpp16
1 files changed, 15 insertions, 1 deletions
diff --git a/main.cpp b/main.cpp
index aeee362..0d3a16a 100644
--- a/main.cpp
+++ b/main.cpp
@@ -180,6 +180,10 @@ int main(int, char**) {
}
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
+
+ glViewport(-10, -10, 660, 740);
+ glScissor(0, 0, 640, 720);
+ glEnable(GL_SCISSOR_TEST);
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
@@ -220,7 +224,7 @@ int main(int, char**) {
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
- glOrtho(0, 100, 0, 100, 0, 10);
+ glOrtho(-10, 110, -10, 110, 0, 10);
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();
@@ -243,7 +247,17 @@ int main(int, char**) {
glDisable(GL_TEXTURE_2D);
glUseProgram(0);
+
+ glDisable(GL_SCISSOR_TEST);
+ glViewport(640, 0, 640, 720);
+
+ glMatrixMode(GL_PROJECTION);
+ glLoadIdentity();
+ glOrtho(0, 100, 0, 100, 0, 10);
+ glMatrixMode(GL_MODELVIEW);
+ glLoadIdentity();
+
glColor4f(1, 1, 1, 1);
char s[0xff];