Home | Info | Community | Development | myReactOS | Contact Us
[static]
Definition at line 5706 of file mipmap.c.
Referenced by empty_image(), emptyImage3D(), gluBuild2DMipmapLevelsCore(), and gluBuild3DMipmapLevelsCore().
{ /* 11111000,00000000 == 0xf800 */ /* 00000111,11000000 == 0x07c0 */ /* 00000000,00111110 == 0x003e */ /* 00000000,00000001 == 0x0001 */ assert(0.0 <= shoveComponents[0] && shoveComponents[0] <= 1.0); assert(0.0 <= shoveComponents[1] && shoveComponents[1] <= 1.0); assert(0.0 <= shoveComponents[2] && shoveComponents[2] <= 1.0); assert(0.0 <= shoveComponents[3] && shoveComponents[3] <= 1.0); /* due to limited precision, need to round before shoving */ ((GLushort *)packedPixel)[index] = ((GLushort)((shoveComponents[0] * 31)+0.5) << 11) & 0xf800; ((GLushort *)packedPixel)[index]|= ((GLushort)((shoveComponents[1] * 31)+0.5) << 6) & 0x07c0; ((GLushort *)packedPixel)[index]|= ((GLushort)((shoveComponents[2] * 31)+0.5) << 1) & 0x003e; ((GLushort *)packedPixel)[index]|= ((GLushort)((shoveComponents[3])+0.5) ) & 0x0001; } /* shove5551() */