summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorpixel <pixel>2002-12-25 14:26:31 +0000
committerpixel <pixel>2002-12-25 14:26:31 +0000
commit2ec65975046c3aa98f2958ca0988d20a36abf5fa (patch)
tree3ef698dfcab536ec1f14fcd3c257225ea4bfdede /src
parent05b3214cc4af88977e09163ce8e3b6cc7256cebe (diff)
Bleh
Diffstat (limited to 'src')
-rw-r--r--src/test.cc33
1 files changed, 1 insertions, 32 deletions
diff --git a/src/test.cc b/src/test.cc
index cf8ef8f..011feb4 100644
--- a/src/test.cc
+++ b/src/test.cc
@@ -17,39 +17,8 @@ virtual int startup() throw (GeneralException) {
verbosity = M_INFO;
- mogltk::texture * mytex = new mogltk::texture(256, 256, true);
+ mogltk::texture * mytex = new mogltk::texture(&Input("pattern6.bmp"), true);
- texture = (Uint8 *) mytex->GetSurface()->pixels;
-
- for (int y = 0; y < 256; y++) {
- for (int x = 0; x < 256; x++) {
- //int r = random() % 256;
- int r = 255;
- texture[(x + y * 256) * 4 + 0] = r;
- texture[(x + y * 256) * 4 + 1] = r;
- texture[(x + y * 256) * 4 + 2] = r;
- texture[(x + y * 256) * 4 + 3] = 255;
- }
- }
-
- SDL_Surface * s;
-
- if (!(s = SDL_LoadBMP("pattern6.bmp"))) {
- throw GeneralException("Error: could not load texture.");
- }
- SDL_BlitSurface(s, NULL, mytex->GetSurface(), NULL);
-
-/*
- for (int y = 0; y < 256; y += 2) {
- for (int x = 0; x < 256; x += 2) {
- texture[(x + y * 256) * 4 + 0] = 0;
- texture[(x + y * 256) * 4 + 1] = 0;
- texture[(x + y * 256) * 4 + 2] = 255;
- texture[(x + y * 256) * 4 + 3] = 0;
- }
- }
-*/
-
mogltk::glbase::Enter2DMode();
mytex->Bind();