Re: [android-developers] openGL texture render size

2011-04-02 Thread lbendlin
those are bit-wise operations. powers of two have a 1 and any number of 0 in binary representation for example 7 (dec) is 111 (bin), and 8 (dec) is 1000 (bin) Just some shifting and ANDing. But nice, that's true. -- You received this message because you are subscribed to the Google Groups

Re: [android-developers] openGL texture render size

2011-04-02 Thread Kostya Vasilyev
It sets every used and intermediate bit to one, resulting in a number greater than the argument, and having the form (2^N)-1 for some N. Adding one at the end rolls all those ones over to the next highest bit, giving 2^N, a power of two. 02.04.2011 3:16 пользователь a a harvey.a...@gmail.com

[android-developers] openGL texture render size

2011-04-01 Thread a a
Why should bitmap with 2, 4, 8, 16, 32, 64, 128.otherwise, it will be white board? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this

Re: [android-developers] openGL texture render size

2011-04-01 Thread Dan Roberts
http://www.khronos.org/webgl/wiki/WebGL_and_OpenGL_Differences While OpenGL 2.0 and later for the desktop offer full support for non-power-of-two (NPOT) textures, OpenGL ES 2.0 and WebGL have only limited NPOT support. Chances are you're using OpenGL ES 1.1 anyways, unless the highest profile

Re: [android-developers] openGL texture render size

2011-04-01 Thread a a
My god, the following algorithm is very very brilliant from your provider url code. function isPowerOfTwo(x) { return (x (x - 1)) == 0; } 2011/4/2 Dan Roberts ademan...@gmail.com: http://www.khronos.org/webgl/wiki/WebGL_and_OpenGL_Differences While OpenGL 2.0 and later for the desktop

Re: [android-developers] openGL texture render size

2011-04-01 Thread a a
But i can't understand the following algorithm function nextHighestPowerOfTwo(x) { --x; for (var i = 1; i 32; i = 1) { x = x | x i; } return x + 1; } 2011/4/2 a a harvey.a...@gmail.com: My god, the following algorithm is very very brilliant from your provider url