From 6b63855d6e31a4d63ced9c803847ee35c70ee514 Mon Sep 17 00:00:00 2001 From: pixel Date: Sun, 9 Feb 2003 19:29:34 +0000 Subject: Whoups.. --- lib/gltexture.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib') diff --git a/lib/gltexture.cc b/lib/gltexture.cc index b674c50..601d24f 100644 --- a/lib/gltexture.cc +++ b/lib/gltexture.cc @@ -21,7 +21,7 @@ mogltk::texture * mogltk::texture::active = 0; mogltk::texture::texture(int w, int h, bool plane) throw (GeneralException) : width(w), height(h), texture_allocated(false), planar(plane), tainted(true) { - if ((BITCOUNT(w) != 1) || (BITCOUNT(h) != 1)) + if ((!ISPOT(w)) || (!ISPOT(h))) throw GeneralException(_("Size of the texture not a power of 2!")); if (!(surface = SDL_CreateRGBSurface(SDL_SWSURFACE, width, height, 32, @@ -53,7 +53,7 @@ mogltk::texture::texture(int w, int h, bool plane) throw (GeneralException) : wi #endif } -mogltk::texture::texture(Handle * h, bool plane) throw (GeneralException) : +mogltk::texture::texture(Handle * h, bool plane, texture_type ttype) throw (GeneralException) : texture_allocated(false), planar(plane), tainted(true) { SDL_Surface * temp; @@ -68,7 +68,7 @@ mogltk::texture::texture(Handle * h, bool plane) throw (GeneralException) : width = temp->w; height = temp->h; - if ((BITCOUNT(width) != 1) || (BITCOUNT(height) != 1)) { + if ((!ISPOT(width)) || (!ISPOT(height))) { SDL_FreeSurface(temp); throw GeneralException(_("Size of the texture not a power of 2!")); } -- cgit v1.2.3