diff options
author | taw27 <taw27@84d2e878-0bd5-11dd-ad15-13eda11d74c5> | 2008-07-28 09:59:55 +0000 |
---|---|---|
committer | taw27 <taw27@84d2e878-0bd5-11dd-ad15-13eda11d74c5> | 2008-07-28 09:59:55 +0000 |
commit | 9678c6fe57797469b48bc6245f3d5ac474ac96ef (patch) | |
tree | bbfd37d690ae8519554939d8bb88872da20ae314 | |
parent | 35eb510aceaa7753af76bba1182d91a95811ccd7 (diff) |
Don't complain if normal maps can't be loaded
git-svn-id: svn://cook.msm.cam.ac.uk:745/thrust3d/thrust3d@189 84d2e878-0bd5-11dd-ad15-13eda11d74c5
-rw-r--r-- | src/texture.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/texture.c b/src/texture.c index 9079a3e..9476d75 100644 --- a/src/texture.c +++ b/src/texture.c @@ -39,7 +39,6 @@ static int texture_load_png(char *filename, GLuint *name) { /* Open file */ fh = fopen(filename, "rb"); if ( !fh ) { - fprintf(stderr, "Couldn't open texture file '%s'\n", filename); return 1; } @@ -154,7 +153,10 @@ void texture_load(RenderContext *ctx, char *name) { snprintf(colourmap_filename, 255, "%s/textures/%s.png", DATADIR, name); snprintf(normalmap_filename, 255, "%s/textures/%s-normals.png", DATADIR, name); - if ( texture_load_png(colourmap_filename, &colourmap) != 0 ) return; + if ( texture_load_png(colourmap_filename, &colourmap) != 0 ) { + fprintf(stderr, "Couldn't load texture '%s'\n", name); + return; + } ctx->textures[ctx->num_textures].texname = colourmap; if ( texture_load_png(normalmap_filename, &normalmap) == 0 ) { |