Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Page 2 of 2 FirstFirst 12
Results 11 to 12 of 12

Thread: Performance of Display Lists

  1. #11
    Member Regular Contributor
    Join Date
    Apr 2001
    Location
    Greece
    Posts
    496

    Re: Performance of Display Lists

    It doesn't optimize the call to glDrawElements.It just executes the call and,instead of drawing the data, it caches it on the server in a (hopefully) HW friendly way.Anyway whether you called glDrawElements or used immediate mode,it wouldn't make any difference.Thats why you can free the arrays afterwards,the data is allready at the server.I'm not sure about the second one but it shouldn't have much to do w/ display lists,rather with wehter its generally better to use QUADS or TRIANGLES.But since opengl tesselates everything to tris before rendering(doesn't it?) it shouldn't make a difference since it propably will be tesselated during list compilation.

  2. #12
    Super Moderator OpenGL Guru
    Join Date
    Feb 2000
    Location
    Montreal, Canada
    Posts
    4,421

    Re: Performance of Display Lists

    Yes, but the issue is

    with GL_QUADS, you have x number of vertices, and X number of indices for glDrawElements

    with GL_TRIANGLES, you have x number of vertices, and Y number of vertices for glDrawElements.

    So X < Y, right?

    GL_QUADS would be better or the driver will break them up in TRIANGLES and redo your indices accordingly.

    Let's forget about display lists for a moment if it doesnt make a difference.

    V-man
    ------------------------------
    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);

Posting Permissions

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