pack_ubyte_ARGB4444_REV(const GLubyte src[4], void *dst)
{
GLushort *d = ((GLushort *) dst);
- *d = PACK_COLOR_4444(src[GCOMP], src[BCOMP], src[ACOMP], src[RCOMP]);
+ *d = PACK_COLOR_4444(src[BCOMP], src[GCOMP], src[RCOMP], src[ACOMP]);
}
static void
const GLushort *s = ((const GLushort *) src);
GLuint i;
for (i = 0; i < n; i++) {
- dst[i][RCOMP] = ((s[i] ) & 0xf) * (1.0F / 15.0F);
- dst[i][GCOMP] = ((s[i] >> 12) & 0xf) * (1.0F / 15.0F);
- dst[i][BCOMP] = ((s[i] >> 8) & 0xf) * (1.0F / 15.0F);
- dst[i][ACOMP] = ((s[i] >> 4) & 0xf) * (1.0F / 15.0F);
+ dst[i][RCOMP] = ((s[i] >> 4) & 0xf) * (1.0F / 15.0F);
+ dst[i][GCOMP] = ((s[i] >> 8) & 0xf) * (1.0F / 15.0F);
+ dst[i][BCOMP] = ((s[i] >> 12) & 0xf) * (1.0F / 15.0F);
+ dst[i][ACOMP] = ((s[i] ) & 0xf) * (1.0F / 15.0F);
}
}
const GLushort *s = ((const GLushort *) src);
GLuint i;
for (i = 0; i < n; i++) {
- dst[i][RCOMP] = EXPAND_4_8((s[i] ) & 0xf);
- dst[i][GCOMP] = EXPAND_4_8((s[i] >> 12) & 0xf);
- dst[i][BCOMP] = EXPAND_4_8((s[i] >> 8) & 0xf);
- dst[i][ACOMP] = EXPAND_4_8((s[i] >> 4) & 0xf);
+ dst[i][RCOMP] = EXPAND_4_8((s[i] >> 4) & 0xf);
+ dst[i][GCOMP] = EXPAND_4_8((s[i] >> 8) & 0xf);
+ dst[i][BCOMP] = EXPAND_4_8((s[i] >> 12) & 0xf);
+ dst[i][ACOMP] = EXPAND_4_8((s[i] ) & 0xf);
}
}
GLint i, GLint j, GLint k, GLfloat *texel )
{
const GLushort s = *TEXEL_ADDR(GLushort, texImage, i, j, k, 1);
- texel[RCOMP] = ((s ) & 0xf) * (1.0F / 15.0F);
- texel[GCOMP] = ((s >> 12) & 0xf) * (1.0F / 15.0F);
- texel[BCOMP] = ((s >> 8) & 0xf) * (1.0F / 15.0F);
- texel[ACOMP] = ((s >> 4) & 0xf) * (1.0F / 15.0F);
+ texel[RCOMP] = ((s >> 4) & 0xf) * (1.0F / 15.0F);
+ texel[GCOMP] = ((s >> 8) & 0xf) * (1.0F / 15.0F);
+ texel[BCOMP] = ((s >> 12) & 0xf) * (1.0F / 15.0F);
+ texel[ACOMP] = ((s ) & 0xf) * (1.0F / 15.0F);
}