PDA

View Full Version : glPixelTransfer/glDrawPixels Slowdown Problem



Kale
04-20-2004, 05:13 PM
Hi all,

I'm trying to display a bitmap using glDrawPixels and thought that I might be able to control brightness by using glPixelTransfer to add a bias to my red, green, and blue channels. It seems to be no problem on my desktop PC (which has integrated Intel 82845G graphics), but when I move the source over to our development PC (with an nVidia GeForce4 MX440) the app slows to a crawl and the GUI becomes unresponsive.

So...I was wondering if anybody has ever seen something similar, what the cause might be, and how would I remedy the situation? I was also wondering if anyone knows whether or not the bias and glPixelMap functions are hardware accelerated on an nVidia GeForce4 MX440.

Thanks,
Kale

ioquan
04-20-2004, 07:25 PM
It is much faster to draw 2D graphics with textured quads than with glDrawPixels. I think this is because texture objects are stored on the video card and dont have to be passed to the card each time they are drawn.

ZbuffeR
04-21-2004, 02:47 AM
As glDrawPixels is not used a lot because it is slow, so it not well implemented on gfx cards, so it is used even less, etc.

Even with a dynamic texture, it can be faster to use a textured quad and glTexSubImage to change the texels.

Kale
04-21-2004, 09:37 AM
Thanks for the responses...I'll give the textured quad a try...