diff options
Diffstat (limited to 'glut/pyramid.c')
-rw-r--r-- | glut/pyramid.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/glut/pyramid.c b/glut/pyramid.c index c7a7f45..9249b26 100644 --- a/glut/pyramid.c +++ b/glut/pyramid.c @@ -58,6 +58,8 @@ static void SetupRC() /* load texture */ glPixelStorei(GL_UNPACK_ALIGNMENT, 1); pBytes = gltLoadTGA("stone.tga", &iWidth, &iHeight, &iComponents, &eFormat); + if (!pBytes) + fprintf(stderr, "gltLoadTGA: failed to load texture!\n"); /* load texture image */ glTexImage2D(GL_TEXTURE_2D, 0, iComponents, iWidth, iHeight, 0, eFormat, |