diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/test.cc | 33 | 
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(); | 
