X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?p=laserbrain_demo;a=blobdiff_plain;f=src%2Ftexture.cc;h=cbbd11dc455c7a0ca87ac8d579e128382293a8a8;hp=dddc0d1ee5f81a059946b6327b907f75bfdebb42;hb=017ce4cb4c27802eb620227fd822f5e4e03efa3b;hpb=31e1ffedb543e048673b7ba969607fbb8214ac9a diff --git a/src/texture.cc b/src/texture.cc index dddc0d1..cbbd11d 100644 --- a/src/texture.cc +++ b/src/texture.cc @@ -4,6 +4,7 @@ #include "image.h" #include "opengl.h" #include "imago2.h" +#include "logger.h" static int glifmt_from_ifmt(unsigned int ifmt); static int glfmt_from_ifmt(unsigned int ifmt); @@ -148,7 +149,7 @@ void Texture::bind(int tex_unit) const void Texture::create(int xsz, int ysz, TextureType textype, unsigned int ifmt) { if(textype == TEX_CUBE && xsz != ysz) { - fprintf(stderr, "trying to create cubemap with different width and height (%dx%d)\n", xsz, ysz); + error_log("trying to create cubemap with different width and height (%dx%d)\n", xsz, ysz); return; } @@ -321,12 +322,12 @@ bool Texture::load(const char *fname) { Image img; if(!img.load(fname)) { - fprintf(stderr, "failed to load 2D texture: %s\n", fname); + error_log("failed to load 2D texture: %s\n", fname); return false; } set_image(img); - printf("loaded 2D texture: %s\n", fname); + info_log("loaded 2D texture: %s\n", fname); return true; }