summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorpixel <pixel>2003-02-09 19:29:34 +0000
committerpixel <pixel>2003-02-09 19:29:34 +0000
commit6b63855d6e31a4d63ced9c803847ee35c70ee514 (patch)
tree35bc4826caab46add73a81751a3840c6ad9a2689 /lib
parent2ce366684532475971543bfdfa7abeb001354371 (diff)
Whoups..
Diffstat (limited to 'lib')
-rw-r--r--lib/gltexture.cc6
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!"));
}