Posts about asm
  • Next power of two

    While looking to write a pure ooc version of ftgl, I was reading the source of ftgl-gl3 and I stumbled upon this piece of code:

    static inline GLuint NextPowerOf2(GLuint in)
    {
         in -= 1;
    
         in |= in >> 16;
         in |= in >> 8;
         in |= in >> 4;
         in...
    Read more