iOS/buildlibs/armv7/allegro-4.4.2/addons/allegrogl/src/glvtable.c
/* Computes the next power of two if the number wasn't a power of two to start
 * with. Ref: http://bob.allegronetwork.com/prog/tricks.html#roundtonextpowerof2
 */
Computes the next power of two if the number wasn't a power of two to start
with.
Computes the next power of two if the number wasn ' t a power of two to start with .
int __allegro_gl_make_power_of_2(int x) {
	x--;
	x |= (x >> 1);
	x |= (x >> 2);
	x |= (x >> 4);
	x |= (x >> 8);
	x |= (x >> 16);
	x++;
	return x;
}
int __allegro_gl_make_power_of_2 ( int x ) { x -- ; x |= ( x >> 1 ) ; x |= ( x >> 2 ) ; x |= ( x >> 4 ) ; x |= ( x >> 8 ) ; x |= ( x >> 16 ) ; x ++ ; return x ; }
Computes the next power of two if the number wasn't a power of two to start
 with.
Computes the next power of two if the number wasn ' t a power of two to start with .