I observed that, on some OpenGL drivers when texturing is enabled pixel level draw functions (glDrawPixels, glBitmap and probably the others) are textured with the active texture.
The below code draws a blue drawpixels rectangle, regardless of the pixels parameter glDrawPixels takes.
// set the first pixel color to blue
texture[0][0][0]=0;
texture[0][0][1]=0;
texture[0][0][2]=255;
glBindTexture(GL_TEXTURE_2D,1);
glEnable(GL_TEXTURE_2D);
glTexImage2D(GL_TEXTURE_2D,0,3,256,256,0,
GL_RGB,GL_UNSIGNED_BYTE,texture);
glTexEnvi(GL_TEXTURE_ENV,GL_TEXTURE_ENV_MODE, GL_DECAL);
glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER, GL_NEAREST);
glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER, GL_NEAREST);
glDrawPixels(256,256,GL_RGB,GL_UNSIGNED_BYTE,bitmap);
However, this is not a common behaviour.
On Windows platform,
Intel 965 draws both glBitmap and glDrawPixels as textured,
MESA (soft renderer) just draws glBitmap as textured,
ATI 4850 draws none of them as textured
I thought only primitives are textured in OpenGL. However, I could not find any documentation about this behaviour. It does not seem to be a part of a functionality with purpose maybe a bug.
Is it possible that those pixel level functions implicitly using textures to transfer data? or
Is there any idea for the usage of the textured pixels on the field?