diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/gltexture.cc | 6 |
1 files changed, 3 insertions, 3 deletions
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!")); } |