Unfortunately, the functionality of SGI_color_matrix is difficult to efficiently duplicate on systems which do not support the extension. In the case where the image is going from the host to the framebuffer (a glDrawPixels() operation), the best way to handle the situation is the split the image up into red, green, blue, and alpha images (via application processing or a draw followed by reads with format set to GL_RED, GL_GREEN, GL_BLUE, or GL_ALPHA). The red, green, blue, and alpha images can be drawn as GL_LUMINANCE images. RGBA scale operations are applied, with the four values equal to the row of the matrix corresponding to source channel. The images are composited in the framebuffer using blending (glBlendFuncGL_ONE, GL_ONE(GL_ONE, GL_ONE)).