- int i, aref, npix;
- unsigned char *src, *dest;
- struct texture *tex = pixmap->udata;
-
- if(!tex) {
- struct img_pixmap *img = img_create();
- img_set_pixels(img, pixmap->width, pixmap->height, IMG_FMT_RGBA32, 0);
-
- npix = pixmap->width * pixmap->height;
- src = pixmap->pixels;
- dest = img->pixels;
- for(i=0; i<npix; i++) {
- dest[0] = dest[1] = dest[2] = 0xff;
- dest[3] = *src++;
- dest += 4;
- }