313 |
DBG(dbg) << "CreateTexRectImpl\n"; |
DBG(dbg) << "CreateTexRectImpl\n"; |
314 |
setWindow(); |
setWindow(); |
315 |
Image *img = images.get(id); |
Image *img = images.get(id); |
316 |
|
DBG(dbg) << "got image\n"; |
317 |
Mosaic::MosaicTile *t = new Mosaic::MosaicTile(); |
Mosaic::MosaicTile *t = new Mosaic::MosaicTile(); |
318 |
int w = img->w; |
int w = img->w; |
319 |
int h = img->h; |
int h = img->h; |
320 |
*t = mosaicbuilder->alloc(w, h); |
*t = mosaicbuilder->alloc(w, h); |
321 |
|
DBG(dbg) << "got mosaic tile\n"; |
322 |
img->loadInto(*t, 0, 0, w, h); |
img->loadInto(*t, 0, 0, w, h); |
323 |
|
DBG(dbg) << "loaded image into tile\n"; |
324 |
mosaicbuilder->prepare(); |
mosaicbuilder->prepare(); |
325 |
|
DBG(dbg) << "prepared builder\n"; |
326 |
releaseWindow(); |
releaseWindow(); |
327 |
DBG(dbg) << "Created tex rect, in "<<t->getRect().tex<<"\n"; |
DBG(dbg) << "Created tex rect, in "<<t->getRect().tex<<"\n"; |
328 |
return imagetiles.add(t); |
return imagetiles.add(t); |