[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gzz-commits] gzz/gfx jni/GzzGL-jni.cxx libmosaic/Mosaic.cxx
From: |
Tuomas J. Lukka |
Subject: |
[Gzz-commits] gzz/gfx jni/GzzGL-jni.cxx libmosaic/Mosaic.cxx |
Date: |
Thu, 12 Sep 2002 11:42:24 -0400 |
CVSROOT: /cvsroot/gzz
Module name: gzz
Changes by: Tuomas J. Lukka <address@hidden> 02/09/12 11:42:24
Modified files:
gfx/jni : GzzGL-jni.cxx
gfx/libmosaic : Mosaic.cxx
Log message:
Fix test sense
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gfx/jni/GzzGL-jni.cxx.diff?tr1=1.15&tr2=1.16&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gfx/libmosaic/Mosaic.cxx.diff?tr1=1.6&tr2=1.7&r1=text&r2=text
Patches:
Index: gzz/gfx/jni/GzzGL-jni.cxx
diff -c gzz/gfx/jni/GzzGL-jni.cxx:1.15 gzz/gfx/jni/GzzGL-jni.cxx:1.16
*** gzz/gfx/jni/GzzGL-jni.cxx:1.15 Thu Sep 12 11:30:04 2002
--- gzz/gfx/jni/GzzGL-jni.cxx Thu Sep 12 11:42:23 2002
***************
*** 313,324 ****
--- 313,328 ----
DBG(dbg) << "CreateTexRectImpl\n";
setWindow();
Image *img = images.get(id);
+ DBG(dbg) << "got image\n";
Mosaic::MosaicTile *t = new Mosaic::MosaicTile();
int w = img->w;
int h = img->h;
*t = mosaicbuilder->alloc(w, h);
+ DBG(dbg) << "got mosaic tile\n";
img->loadInto(*t, 0, 0, w, h);
+ DBG(dbg) << "loaded image into tile\n";
mosaicbuilder->prepare();
+ DBG(dbg) << "prepared builder\n";
releaseWindow();
DBG(dbg) << "Created tex rect, in "<<t->getRect().tex<<"\n";
return imagetiles.add(t);
Index: gzz/gfx/libmosaic/Mosaic.cxx
diff -c gzz/gfx/libmosaic/Mosaic.cxx:1.6 gzz/gfx/libmosaic/Mosaic.cxx:1.7
*** gzz/gfx/libmosaic/Mosaic.cxx:1.6 Thu Sep 12 11:30:04 2002
--- gzz/gfx/libmosaic/Mosaic.cxx Thu Sep 12 11:42:23 2002
***************
*** 15,21 ****
DBG(dbg) << "TexId:: allocating\n";
glGenTextures(1, &id);
DBG(dbg) << "TexId:: got "<<id<<"\n";
! if(this->isGood()) throw InvalidTexture();
DBG(dbg) << "TexId:: allocated\n";
}
--- 15,24 ----
DBG(dbg) << "TexId:: allocating\n";
glGenTextures(1, &id);
DBG(dbg) << "TexId:: got "<<id<<"\n";
! if(!this->isGood()) {
! DBG(dbg) << "Didn't get a texture, bailing out\n";
! throw InvalidTexture();
! }
DBG(dbg) << "TexId:: allocated\n";
}
***************
*** 130,135 ****
--- 133,139 ----
}
MosaicTile MosaicBuilder::alloc(int w, int h, int border) {
+ DBG(dbg) << "Alloc "<<w<<" "<<h<<" "<<border<<"\n";
if(textures.size() == 0) createNew();
int pw = w + 2*border;
int ph = h + 2*border;
***************
*** 138,145 ****
if(!b.valid()) {
createNew();
b = textures.back()->talloc->alloc(pw, ph);
! if(!b.valid())
throw TooLarge();
}
return MosaicTile(textures.back()->tex,
b.x + border, b.y + border, b.x+b.w - border,
--- 142,151 ----
if(!b.valid()) {
createNew();
b = textures.back()->talloc->alloc(pw, ph);
! if(!b.valid()) {
! std::cerr << "Too large texture\n";
throw TooLarge();
+ }
}
return MosaicTile(textures.back()->tex,
b.x + border, b.y + border, b.x+b.w - border,
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gzz-commits] gzz/gfx jni/GzzGL-jni.cxx libmosaic/Mosaic.cxx,
Tuomas J. Lukka <=