summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorpixel <pixel>2003-01-21 01:50:58 +0000
committerpixel <pixel>2003-01-21 01:50:58 +0000
commitcbb8340d3b139596e94f2caa3ca51577d8fa3d0e (patch)
treeb31bd1948b461e6f4bbd87394bede1ec2285f464 /src
parentf953fad0ce8c3358659fb63e99e0798bc20c392e (diff)
Fixed a bit the SDL code...
Diffstat (limited to 'src')
-rw-r--r--src/test.cc99
1 files changed, 49 insertions, 50 deletions
diff --git a/src/test.cc b/src/test.cc
index d4dacc9..bd98ef3 100644
--- a/src/test.cc
+++ b/src/test.cc
@@ -21,60 +21,59 @@ virtual int startup() throw (GeneralException) {
mogltk::texture * mytex = new mogltk::texture(pattern, true);
delete pattern;
- mogltk::glbase::Enter2DMode();
+ while (true) {
+ mogltk::glbase::Enter2DMode();
- mytex->Bind();
- glBegin(GL_TRIANGLE_STRIP);
- glColor3d(0, 0, 0);
- glTexCoord2i(0, 0);
- glVertex2f(50, 50);
- glColor3d(1, 0, 0);
- glTexCoord2i(511, 0);
- glVertex2f(561, 50);
- glColor3d(0, 1, 0);
- glTexCoord2i(0, 511);
- glVertex2f(50, 561);
- glColor3d(0, 0, 1);
- glTexCoord2i(511, 511);
- glVertex2f(561, 561);
- glEnd();
+ mytex->Bind();
+ glBegin(GL_TRIANGLE_STRIP);
+ glColor3d(0, 0, 0);
+ glTexCoord2i(0, 0);
+ glVertex2f(50, 50);
+ glColor3d(1, 0, 0);
+ glTexCoord2i(511, 0);
+ glVertex2f(561, 50);
+ glColor3d(0, 1, 0);
+ glTexCoord2i(0, 511);
+ glVertex2f(50, 561);
+ glColor3d(0, 0, 1);
+ glTexCoord2i(511, 511);
+ glVertex2f(561, 561);
+ glEnd();
- mogltk::texture::Unbind();
- glBegin(GL_TRIANGLE_STRIP);
- glColor3d(0, 0, 0);
- glVertex2f(400, 100);
- glColor3d(1, 0, 0);
- glVertex2f(450, 100);
- glColor3d(0, 1, 0);
- glVertex2f(400, 150);
- glColor3d(0, 0, 1);
- glVertex2f(450, 150);
- glEnd();
+ mogltk::texture::Unbind();
+ glBegin(GL_TRIANGLE_STRIP);
+ glColor3d(0, 0, 0);
+ glVertex2f(400, 100);
+ glColor3d(1, 0, 0);
+ glVertex2f(450, 100);
+ glColor3d(0, 1, 0);
+ glVertex2f(400, 150);
+ glColor3d(0, 0, 1);
+ glVertex2f(450, 150);
+ glEnd();
- glBegin(GL_TRIANGLE_STRIP);
- CORNFLOWERBLUE.Bind();
- glVertex2f( 5, 5);
- DEEPSKYBLUE.Bind();
- glVertex2f(150, 5);
- MIDNIGHTBLUE.Bind();
- glVertex2f( 5, 80);
- NAVY.Bind();
- glVertex2f(150, 80);
- glEnd();
- font.setshadow(1);
- font.putcursor(10, 30);
- font.setcolor(WHITE);
- font.printf(
- "PixelPawa!\n"
- "It works!!\n"
- "I can't believe it!\n"
- );
- mogltk::glbase::Leave2DMode();
- mogltk::glbase::Flip();
-
-// sleep(15);
- getchar();
+ glBegin(GL_TRIANGLE_STRIP);
+ CORNFLOWERBLUE.Bind();
+ glVertex2f( 5, 5);
+ DEEPSKYBLUE.Bind();
+ glVertex2f(150, 5);
+ MIDNIGHTBLUE.Bind();
+ glVertex2f( 5, 80);
+ NAVY.Bind();
+ glVertex2f(150, 80);
+ glEnd();
+ font.setshadow(1);
+ font.putcursor(10, 30);
+ font.setcolor(WHITE);
+ font.printf(
+ "PixelPawa!\n"
+ "It works!!\n"
+ "I can't believe it!\n"
+ );
+ mogltk::glbase::Leave2DMode();
+ mogltk::glbase::Flip();
+ }
delete mytex;