don't make directories for incorrect files, and put alpha 1 on red could-not-find textures

This commit is contained in:
David Rose 2003-06-04 21:11:31 +00:00
parent dbfb75f964
commit 218659244f
2 changed files with 4 additions and 4 deletions

View File

@ -82,6 +82,10 @@ copy(TextureImage *texture) {
// Couldn't read the texture, so fill it with red. // Couldn't read the texture, so fill it with red.
PNMImage dest_image(_x_size, _y_size, texture->get_num_channels()); PNMImage dest_image(_x_size, _y_size, texture->get_num_channels());
dest_image.fill(1.0, 0.0, 0.0); dest_image.fill(1.0, 0.0, 0.0);
if (dest_image.has_alpha()) {
dest_image.alpha_fill(1.0);
}
write(dest_image); write(dest_image);
} }
} }

View File

@ -134,9 +134,6 @@ make_user_filename(Filename filename) {
// caches the operation so that repeated calls to // caches the operation so that repeated calls to
// filenames in the same directory will tend to be // filenames in the same directory will tend to be
// faster. // faster.
//
// Also guarantees that the directory containing the
// filename exists by making it if it does not.
//////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////
void FilenameUnifier:: void FilenameUnifier::
make_canonical(Filename &filename) { make_canonical(Filename &filename) {
@ -153,7 +150,6 @@ make_canonical(Filename &filename) {
return; return;
} }
filename.make_dir();
filename.make_canonical(); filename.make_canonical();
_canonical_filenames.insert(CanonicalFilenames::value_type(dirname, filename.get_dirname())); _canonical_filenames.insert(CanonicalFilenames::value_type(dirname, filename.get_dirname()));
} }