Image Pyramid and OpenGL

I want show RS images using OpenGL, aslo I will use image pyramid to manage these large images.
It is no problem that I have to use mipmap.
But my question is why gluBuild2DMipmaps is so slow.

RS images?

How big is the image, and how fast do you expect it to be? Generating mipmaps requires at minimum a convolution of the image with a box filter kernel, for each level (not a trivial affair for the CPU).

You could try extensions like glTexParameteri(<target>, GL_GENERATE_MIPMAP, GL_TRUE) or glGenerateMipmapEXT(<target>) for automatic mipmap generation, but I don’t think there are any guarantees it will be faster either way (none specified).

Really, the best you can do for speed is generate your mipmaps offline and supply them yourself at run time via glTexImage*.

gluBuild2DMipmaps is implemented in software, so there is a good chance that the generate mipmap extension is faster.