dst[i*2+1] = FLOAT_TO_UBYTE(rgba[i][ACOMP]);
}
break;
+ case GL_RG:
+ for (i=0;i<n;i++) {
+ dst[i*2+0] = FLOAT_TO_UBYTE(rgba[i][RCOMP]);
+ dst[i*2+1] = FLOAT_TO_UBYTE(rgba[i][GCOMP]);
+ }
+ break;
case GL_RGB:
for (i=0;i<n;i++) {
dst[i*3+0] = FLOAT_TO_UBYTE(rgba[i][RCOMP]);
dst[i*2+1] = FLOAT_TO_BYTE(rgba[i][ACOMP]);
}
break;
+ case GL_RG:
+ for (i=0;i<n;i++) {
+ dst[i*2+0] = FLOAT_TO_BYTE(rgba[i][RCOMP]);
+ dst[i*2+1] = FLOAT_TO_BYTE(rgba[i][GCOMP]);
+ }
+ break;
case GL_RGB:
for (i=0;i<n;i++) {
dst[i*3+0] = FLOAT_TO_BYTE(rgba[i][RCOMP]);
CLAMPED_FLOAT_TO_USHORT(dst[i*2+1], rgba[i][ACOMP]);
}
break;
+ case GL_RG:
+ for (i=0;i<n;i++) {
+ CLAMPED_FLOAT_TO_USHORT(dst[i*2+0], rgba[i][RCOMP]);
+ CLAMPED_FLOAT_TO_USHORT(dst[i*2+1], rgba[i][GCOMP]);
+ }
+ break;
case GL_RGB:
for (i=0;i<n;i++) {
CLAMPED_FLOAT_TO_USHORT(dst[i*3+0], rgba[i][RCOMP]);
dst[i*2+1] = FLOAT_TO_SHORT(rgba[i][ACOMP]);
}
break;
+ case GL_RG:
+ for (i=0;i<n;i++) {
+ dst[i*2+0] = FLOAT_TO_SHORT(rgba[i][RCOMP]);
+ dst[i*2+1] = FLOAT_TO_SHORT(rgba[i][GCOMP]);
+ }
+ break;
case GL_RGB:
for (i=0;i<n;i++) {
dst[i*3+0] = FLOAT_TO_SHORT(rgba[i][RCOMP]);
dst[i*2+1] = FLOAT_TO_UINT(rgba[i][ACOMP]);
}
break;
+ case GL_RG:
+ for (i=0;i<n;i++) {
+ dst[i*2+0] = FLOAT_TO_UINT(rgba[i][RCOMP]);
+ dst[i*2+1] = FLOAT_TO_UINT(rgba[i][GCOMP]);
+ }
+ break;
case GL_RGB:
for (i=0;i<n;i++) {
dst[i*3+0] = FLOAT_TO_UINT(rgba[i][RCOMP]);
dst[i*2+1] = FLOAT_TO_INT(rgba[i][ACOMP]);
}
break;
+ case GL_RG:
+ for (i=0;i<n;i++) {
+ dst[i*2+0] = FLOAT_TO_INT(rgba[i][RCOMP]);
+ dst[i*2+1] = FLOAT_TO_INT(rgba[i][GCOMP]);
+ }
+ break;
case GL_RGB:
for (i=0;i<n;i++) {
dst[i*3+0] = FLOAT_TO_INT(rgba[i][RCOMP]);
dst[i*2+1] = rgba[i][ACOMP];
}
break;
+ case GL_RG:
+ for (i=0;i<n;i++) {
+ dst[i*2+0] = rgba[i][RCOMP];
+ dst[i*2+1] = rgba[i][GCOMP];
+ }
+ break;
case GL_RGB:
for (i=0;i<n;i++) {
dst[i*3+0] = rgba[i][RCOMP];
dst[i*2+1] = _mesa_float_to_half(rgba[i][ACOMP]);
}
break;
+ case GL_RG:
+ for (i=0;i<n;i++) {
+ dst[i*2+0] = _mesa_float_to_half(rgba[i][RCOMP]);
+ dst[i*2+1] = _mesa_float_to_half(rgba[i][GCOMP]);
+ }
+ break;
case GL_RGB:
for (i=0;i<n;i++) {
dst[i*3+0] = _mesa_float_to_half(rgba[i][RCOMP]);