Title says it all...
IIRC glGenerateMipmap() is hardware accelerated....
Thanks!
Title says it all...
IIRC glGenerateMipmap() is hardware accelerated....
Thanks!
IIRC, an AMD driver dev told me once that glGenerateMipmap() uses a lot of CPU time - so I'm not sure about that.
"once" : when was that ?
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.
------------------------------
Sig: http://glhlib.sourceforge.net
an open source GLU replacement library. Much more modern than GLU.
float matrix[16], inverse_matrix[16];
glhLoadIdentityf2(matrix);
glhTranslatef2(matrix, 0.0, 0.0, 5.0);
glhRotateAboutXf2(matrix, angleInRadians);
glhScalef2(matrix, 1.0, 1.0, -1.0);
glhQuickInvertMatrixf2(matrix, inverse_matrix);
glUniformMatrix4fv(uniformLocation1, 1, FALSE, matrix);
glUniformMatrix4fv(uniformLocation2, 1, FALSE, inverse_matrix);
"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.