drawImageAt slow using openGL


#1

I am using drawImageAt inside the paint() function to draw 1920 x 1080 images to the screen.  Using openGL, it takes on average 40ms to complete this call (OS X 10.8.5 i5 2.3GHz mac mini) - note that it takes around 50ms if I use the normal rendering.  Is there any way to make this faster?

Here is the code I used to time this section:

uint32 start = Time::getMillisecondCounter();

g.drawImage(img, 0, 0,width,height,0,0,img.getWidth(),img.getHeight());

std::cout << "time:" << Time::getMillisecondCounter() - start << std::endl;

Thanks,

Darren

 


#2

That's how long it takes to get the data onto the GPU.. If you're using GL then it will cache the texture so that repeatedly drawing the same image will be much faster than the first time it gets drawn.