Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 6 of 6

Thread: glTexParameteri(GL_TEXTURE_2D, GL_GENERATE_MIPMAP, GL_TRUE) hardware accelerated?

  1. #1
    Junior Member Regular Contributor Mars_999's Avatar
    Join Date
    Mar 2001
    Location
    Sioux Falls, SD, USA
    Posts
    244

    glTexParameteri(GL_TEXTURE_2D, GL_GENERATE_MIPMAP, GL_TRUE) hardware accelerated?

    Title says it all...

    IIRC glGenerateMipmap() is hardware accelerated....

    Thanks!

  2. #2
    Advanced Member Frequent Contributor
    Join Date
    Apr 2010
    Location
    Germany
    Posts
    895
    IIRC, an AMD driver dev told me once that glGenerateMipmap() uses a lot of CPU time - so I'm not sure about that.

  3. #3
    Super Moderator OpenGL Lord
    Join Date
    Dec 2003
    Location
    Grenoble - France
    Posts
    5,655
    "once" : when was that ?

  4. #4
    Advanced Member Frequent Contributor
    Join Date
    Apr 2010
    Location
    Germany
    Posts
    895
    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.

  5. #5
    Super Moderator OpenGL Guru
    Join Date
    Feb 2000
    Location
    Montreal, Canada
    Posts
    4,421
    Quote Originally Posted by Mars_999 View Post
    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.
    ------------------------------
    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);

  6. #6
    Senior Member OpenGL Guru
    Join Date
    May 2009
    Posts
    4,725
    "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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •