cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

xanagan
Journeyman III

glGenerateMipmap is very slow on HD4670

glGenerateMipmap take a very long load time compare to NVIDIA 9800GT

I am working on OpenGL 3.2 forward compatible profile thus the only auto generation of mipmap I can use is glGenerateMipmap.

glGenTextures(1,textureID); glBindTexture(GL_TEXTURE_2D,*textureID); if(colorDepth == 32){ glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA8,width,height,0, GL_RGBA, GL_UNSIGNED_BYTE,pixelData); } else if(colerDepth == 24){ glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB8,width,height,0, GL_RGB, GL_UNSIGNED_BYTE,pixelData); }

 

There are two problem

1.the time take to generate mipmap is very long it take 30 second to generate mipmap of 13 of 2048 * 2048  24bit texture , compare to my GF 9800GT which only take 2~3 second.

2.the quality of mipmap is bad even when viewing upclose,It look like the driver choose some lowres mipmap instead of hires one (very noticable when using mipmap on normalmap/bumpmap texture).

Please someone with knowledge about working with ATI/AMD GPU help me on this,since without any mipmap texture/bumpmap effect will look very shimmering when view from distance.

My system is windows xp ,AMD athlonx2 64bit 250 CPU,  ATIHD4670 with 10.3 driver



glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER,GL_LINEAR); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER,GL_LINEAR_MIPMAP_LINEAR); glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAX_ANISOTROPY_EXT,16);

glHint(GL_GENERATE_MIPMAP_HINT,GL_NICEST); //change this to FASTEST didnt help loding time

glGenerateMipmap(GL_TEXTURE_2D);
0 Likes
2 Replies
koenvdd
Journeyman III

For what its worth, have you tried without the glHint. The GL_GENERATE_MIPMAP_HINT is no longer supported in GL3.2.

0 Likes

do you see the same issue for 24 bit and 32 bit textures ?

Pierre B.

0 Likes