new render target class while working on the exhibit UI
[laserbrain_demo] / src / texture.cc
index f4f7cfe..ed34798 100644 (file)
@@ -43,6 +43,17 @@ void bind_texture(Texture *tex, int tunit)
        }
 }
 
        }
 }
 
+int next_pow2(int x)
+{
+       x--;
+       x = (x >> 1) | x;
+       x = (x >> 2) | x;
+       x = (x >> 4) | x;
+       x = (x >> 8) | x;
+       x = (x >> 16) | x;
+       return x + 1;
+}
+
 
 Image *Texture::default_img;
 
 
 Image *Texture::default_img;