Results 1 to 3 of 3

Thread: Vertex arrays performance

  1. #1
    Senior Member Regular Contributor
    Join Date
    Dec 2002
    Location
    Poland
    Posts
    234

    Vertex arrays performance

    Hello

    Yesterday I was browsing some documents from game developers metting. I was reading something about increasing OpenGL applications performance and it was said that we should use only glDrawElements in case of vertex arrays. Why is that so? Is glDrawArrays worse? I always thought that glDrawArrays is faster than glDrawElement because it don't have to read this whole index array. Meaby there are some other reasons but the article was rather speed-related.
    What do you think about that?

    Thanks

    Orzech

  2. #2
    Member Newbie
    Join Date
    Aug 2003
    Location
    asda
    Posts
    47

    Re: Vertex arrays performance

    Each vertex will be transformed by a matrix-vector multiplication. The graphic hardware has a vertex cache storing some of the latest transformed vertices, this is the reason why glDrawElements is faster most of the time. The value can be found in the cache from the index if its there.

    You are right about what you are writing and glDrawArray should be faster if no vertices is shared between the polygons. If you want to render a real model like a cube is it only 8 different and shared vertices but a lot more polygon vertices.
    asd

  3. #3
    Senior Member Regular Contributor
    Join Date
    Dec 2002
    Location
    Poland
    Posts
    234

    Re: Vertex arrays performance

    Thanks

Similar Threads

  1. Performance and stride of vertex arrays?
    By Keith Z. Leonard in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 06-13-2010, 06:41 AM
  2. vertex arrays, culling for a performance boost
    By nickn in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 05-12-2006, 04:09 AM
  3. vertex arrays and performance
    By in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 12-22-2004, 12:23 AM
  4. Strange performance with vertex arrays...
    By fuxiulian in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 04-28-2004, 11:08 PM
  5. State changes, vertex arrays, and performance
    By Korval in forum OpenGL: Advanced Coding
    Replies: 1
    Last Post: 03-17-2001, 05:18 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean