image masks and raster fixes

This commit is contained in:
aap
2020-07-22 13:56:03 +02:00
parent 853fa44982
commit 4883b03f2b
10 changed files with 569 additions and 71 deletions

View File

@ -299,14 +299,13 @@ defaultFindCB(const char *name)
}
// TODO: actually read the mask!
static Texture*
defaultReadCB(const char *name, const char *mask)
{
Texture *tex;
Image *img;
img = Image::read(name);
img = Image::readMasked(name, mask);
if(img){
tex = Texture::create(Raster::createFromImage(img));
strncpy(tex->name, name, 32);