Texture environment conditions affect the glDrawPixel's behaviour

Hi, The test was doen with ATI Radeon 9700 with recent driver under windows 2000 box.
Im using the glDrawPixel function to review my images, loaded in main memory(because it’s only used for only viewing/editing purposes, the performance consideration is out of the topic.). Roughly say, I thought that the glDrawPixel just transfers the image data into the framebuffer, this ides is based on the imaging pipeline described on the glspec and the red book. So, what I had expeced was the image is drawn on the screen without any modification regardless of the texture stage’s condition. But, what I’ve noticed for real is that the glDrawPixel is affected by each texture stage’s environment condition. For example, when I draw the image using that fuction under the coditions with 2d texture is enabled with texture env mode add, the image is drawn more brightely. When I had turned off all texture enable states, I got the expected result.

Is it the deserved behaviour, only I ve failed to find in the spec? Any comments would be appreciated about these. Thx !


The rebirth of Mr.Twinsen will be avaiable soon

This is the expected conformant behaviour. glDrawPixels goes through all fragment operations (texturing, color sum, fog (or shaders), alpha test, stencil test, depth test, blending, dithering).

Think of glDrawPixels as a series of GL_POINTS.

I’ve fixed it by disabling all texture units before drawing images. Thx for the reply!
Now I feel more comfortable about it :wink: