PDA

View Full Version : glTexParameteri(GL_TEXTURE_2D, GL_GENERATE_MIPMAP, GL_TRUE) hardware accelerated?



Mars_999
07-18-2012, 08:57 PM
Title says it all...

IIRC glGenerateMipmap() is hardware accelerated....

Thanks!

thokra
07-19-2012, 12:07 AM
IIRC, an AMD driver dev told me once that glGenerateMipmap() uses a lot of CPU time - so I'm not sure about that.

ZbuffeR
07-19-2012, 02:24 AM
"once" : when was that ?

thokra
07-19-2012, 03:22 AM
At the beginning of this year. Can't access old PMs I received - either they've been gone when migrating the forum or I've mistakenly deleted them.

V-man
07-19-2012, 06:06 AM
Title says it all...

IIRC glGenerateMipmap() is hardware accelerated....

Thanks!

I don't know if it is hw accelerated but the question is, if it is not hw accelerated, then what is the point in putting it in GL 1.4? We already have the GLU libraries gluScaleImage and gluBuild2DMipmaps.

Alfonse Reinheart
07-19-2012, 11:44 AM
"Hardware accelerated" doesn't necessarily mean "fast" or "low CPU usage".

In order to generate mipmaps, however it is you do that, you must clear all of the framebuffer caches, then attach the various mipmaps in turn, while rendering with a downscaling shader. Repeatedly, until you run out of mipmaps. A cache flush needs to happen between each one.

It is, for all intents and purposes, a rendering function.