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 1 of 2 12 LastLast
Results 1 to 10 of 17

Thread: Vertex array not much faster?

  1. #1
    Intern Newbie
    Join Date
    Aug 2000
    Location
    Beijing P.R.China
    Posts
    40

    Vertex array not much faster?

    I am outputing some triangle fans in my program.
    but in immediate mode, calling glTexCoord2fv and glVertex3fv, I have a FPS of 82.
    When calling glDrawElements(), FPS was 84, only a little faster.
    Is this a resonable result?
    my card is TNT2 Pro

  2. #2
    Advanced Member Frequent Contributor
    Join Date
    Apr 2000
    Posts
    748

    Re: Vertex array not much faster?

    Looks like your application is not CPU-limited, so you can't expect it to be faster with VAs.

    Y.

  3. #3
    Junior Member Newbie
    Join Date
    Nov 2000
    Location
    Moscow,Russia
    Posts
    29

    Re: Vertex array not much faster?

    Store vertex atribs. in video-memory.

  4. #4
    Guest

    Re: Vertex array not much faster?

    On a TNT2, using DrawElement or friends
    instead of immediate mode will not save as
    much, because the CPU still needs to fetch
    all the data and do the transform, so your
    two bottlenecks are typically CPU transform
    and texture fill.

    Immediate mode adds some function call
    overhead, which accounts for the 2 fps speed-
    up you saw. Putting your vertex attributes
    on the card (or in AGP memory) only helps on
    cards with hardware transform, because there
    the bottlenecks are different.

    Thus, profile your code to see if you're fill
    rate limited or vertex transform limited;
    then take the appropriate algorithmic action
    to reduce that part of your work (typically
    by doing smarter culling or clipping in these
    cases).

  5. #5
    Junior Member Newbie
    Join Date
    Nov 2000
    Location
    Moscow,Russia
    Posts
    29

    Re: Vertex array not much faster?

    Excuse me please, you wrote TNT2 PRO,
    I read GF2 PRO ;-).

  6. #6
    Intern Newbie
    Join Date
    Nov 2000
    Location
    Haifa Israel
    Posts
    44

    Re: Vertex array not much faster?

    How do you store vertex atribs in video memory?

  7. #7
    Junior Member Regular Contributor
    Join Date
    Apr 2000
    Posts
    134

    Re: Vertex array not much faster?

    Yeah?? what do you mean by that?? is this the locking system??

  8. #8
    Junior Member Newbie
    Join Date
    Nov 2000
    Location
    Moscow,Russia
    Posts
    29

    Re: Vertex array not much faster?

    To Zedus:Storing vertex information in video memory is useful for GeForce 1-2 cards. There is NV_vertex_array_range extension. It's very easy to use this extension:

    buffer=wglAllocateMemoryNV(sizeof(...)0,0,0);
    glVertexArrayRangeNV(sizeof(...),buffer);


    You can find demo at www.nvidia.com

  9. #9
    Senior Member OpenGL Guru
    Join Date
    Feb 2000
    Location
    Sweden
    Posts
    3,115

    Re: Vertex array not much faster?

    You shouldn't just draw 'some triangles' and then say something like, 'it's not that much faster'. You say your application was running at 82-84 fps, which can easily be the refreshrate of your monitor, and the driver is waiting for a new refresh before swapping the buffers (more commonly known as vertical retrace). What you need to do to be able to come with a more correct conclusion is to draw more that just a few triangles. I would say you need to draw several thousands of them. Begin with 10k or 100k or so.

    And by the way, try turn off the 'wait for vertical retrace' if it is on,and if it was you will probably see a giant leap in performance.

  10. #10
    Advanced Member Frequent Contributor
    Join Date
    Oct 2000
    Location
    Belgium
    Posts
    857

    Re: Vertex array not much faster?

    I did some experiments with this: http://www.gamedeveloper.org/delphi3...d/transfer.zip

    I also have a TNT2, and I found vertex arrays or display lists to be MUCH faster than the equivalent glVertex*() calls.

    - Tom

Posting Permissions

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