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: NV_VERTEX_ARRAY_RANGE (again ;)) usage with static and dynamic geom in 1 scene

  1. #1
    Junior Member Newbie
    Join Date
    Mar 2002
    Location
    Gent, Belgium
    Posts
    4

    NV_VERTEX_ARRAY_RANGE (again ;)) usage with static and dynamic geom in 1 scene

    Hi

    This is the problem:
    I have a bunch of static meshes, and a bunch of dynamic ones. From what i ve read here on the forums it seems to be best to just alloc 1 big chunck of AGP mem to store all of it, so also the static meshes, right? Or should i use display lists?
    But the real issue is the dynamic meshes. How do i store the arrays in AGP mem? Suppose i have a model where i only change vertices and colors, but texcoords stay the same, should i interleave vertices en colors in AGP mem and leave texcoords in a separate piece of memory so i can write fast to the AGP mem? Or should i interleave em all to have all data for 1 vertex packed together?
    Also i saw some guy who claimed in a posting that writing to videomem was faster during rendering as opposed to AGP mem.
    Any tips?

  2. #2
    Intern Contributor
    Join Date
    Feb 2002
    Posts
    73

    Re: NV_VERTEX_ARRAY_RANGE (again ;)) usage with static and dynamic geom in 1 scene

    YMMV...

    What you need to do depends on how many meshes you have, and how much memory is available.

    I said that in my testing, vidmem was faster, but that may vary too (and at least requires "fastwrites" to be enabled).

    For the dynamic meshes, you need to "double-buffer" (use NV_fence) so you don't overwrite stuff the GPU is still rendering. Whether to leave the non-changing parts of the dynamic geometry on card depends - in general, its favorable to avoid any unnecessary traffic over the bus, but an interleaved data format could be more efficient for the graphics hardware.

    As usual, there is no way but to test you specific case...

    Michael

  3. #3
    Junior Member Newbie
    Join Date
    Mar 2002
    Location
    Gent, Belgium
    Posts
    4

    Re: NV_VERTEX_ARRAY_RANGE (again ;)) usage with static and dynamic geom in 1 scene

    This is something else i dont understand. Why isnt it possible to store the static parts of the geometry (eg texture coords) in videomemory, and the dynamic ones in AGP mem? In Direct3D the api makes it possible (i think), but ofcourse that depends on what the driver does with the hints. Is this a limitation of the GeForce chip or is it a limitation of the NV_VERTEX_ARRAY_RANGE extension?

    And wont interleaving array data in AGP mem kill the vertex write speed to AGP mem?

    Joris

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

    Re: NV_VERTEX_ARRAY_RANGE (again ;)) usage with static and dynamic geom in 1 scene

    This is very possible, but there is a significant cost when switching from video to AGP memory. It only starts to be usefull when you're T&L limited, on very high polycount scenes.

    Y.

  5. #5
    Junior Member Newbie
    Join Date
    Mar 2002
    Location
    Gent, Belgium
    Posts
    4

    Re: NV_VERTEX_ARRAY_RANGE (again ;)) usage with static and dynamic geom in 1 scene

    No, what i meant was to store the static parts of 1 object in videomem while keeping the dynamic ones in AGP. According to the spec all arrays passed when using NV_VERTEX_ARRAY_RANGE must be in the same mem, so no texcoords in videomem while vertices in AGP. Why is this?

  6. #6
    Junior Member Regular Contributor
    Join Date
    Dec 2000
    Location
    Madrid, Spain
    Posts
    149

    Re: NV_VERTEX_ARRAY_RANGE (again ;)) usage with static and dynamic geom in 1 scene

    Originally posted by ir6666:
    This is something else i dont understand. Why isnt it possible to store the static parts of the geometry (eg texture coords) in videomemory, and the dynamic ones in AGP mem? In Direct3D the api makes it possible (i think), but ofcourse that depends on what the driver does with the hints. Is this a limitation of the GeForce chip or is it a limitation of the NV_VERTEX_ARRAY_RANGE extension?

    And wont interleaving array data in AGP mem kill the vertex write speed to AGP mem?

    Joris
    Yes. In one little test I did, it creates the static vertex buffers (in D3D) in video memory (on nVidia and ATI hw) and dynamic ones in AGP (by default). It is something sometimes I miss from VAR extension.
    Anyway, in a real program, if you have everything (static and dynamic geometry) in AGP, it will work fine. (It is different if you do a small app just to see vertex throughput drawing some static models having them on videomem is a real win). In real apps vertex transfer is not (usually) the biggest bottleneck (so you will find little of no difference of having it on videomem or agp mem). Anyway it will be good if the extension allows you to do it.
    The other day, looking at nVidia web site, I find this small memory manager that can help you (it has many comments in the source explaining how it works):
    http://cvs1.nvidia.com/OpenGL/src/li...ar_mem_mgr.cpp

    Hope this helps

Posting Permissions

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