Loading ...
Sorry, an error occurred while loading the content.
 

Re: Secrets of high performance

Expand Messages
  • Michael König
    ... I had similar effects, when migrating to VBOs on a GeForce 1. I used VARs with parameters for wglAllocateMemoryNV that resulted in AGP accessible memory
    Message 1 of 9 , Sep 16 3:14 AM
      On Mon, 15 Sep 2003, Eero Pajarre wrote:

      > I unfortunatelly I still see something like at least 10% loss in framerate when
      > going from NV_VAR to ARB_VBO.
      I had similar effects, when migrating to VBOs on a GeForce 1. I used VARs
      with parameters for wglAllocateMemoryNV that resulted in AGP accessible
      memory being returned i guess. This saved the driver at least a mem copy
      each time i modified the geometry before the DMA transfer to the video card
      occurred. Since i updated my mesh every frame at that time, VARs with this
      memory setup were faster that VBOs. I was unable to regain that speed with
      VBOs, but still sticked with the extension since it was more portable. And
      its interface is more straightforward as well.
      The reason you really cant get the same speed compared to VAR in my
      described situation is that regardless of the access enums you pass to the
      VBO buffer functions with nvidia drivers(45.23) at least, memory with the
      same properties is used to store the vertex data. I was unable to detect
      any performance differences at all when i experimented with the different
      enums.
      VARs were only faster than VBOs for me when updating the mesh every frame.
      When updating the geometry less often VBOs should be superior. Still when
      passing the right enum to the VBO extension(STREAM_DRAW) the driver should
      use the same type of memory thats returned by wglAllocateMemoryNV with the
      right parameters. Maybe that will change in the 50+ drivers, who knows.

      Michael König


      -----
      FAQ and OpenGL Resources at:
      http://www.geocities.com/SiliconValley/Hills/9956/OpenGL

      --
      Author: =?ISO-8859-1?Q?Michael_K=F6nig?=
      INET: plasm@...-aachen.de

      Fat City Network Services -- 858-538-5051 http://www.fatcity.com
      San Diego, California -- Mailing list and web hosting services
      ---------------------------------------------------------------------
      To REMOVE yourself from this mailing list, send an E-Mail message
      to: ListGuru@... (note EXACT spelling of 'ListGuru') and in
      the message BODY, include a line containing: UNSUB OPENGL-GAMEDEV-L
      (or the name of mailing list you want to be removed from). You may
      also send the HELP command for other information (like subscribing).
    • JM
      Hi there, Well the way I do it is create my own vertex buffer that push all the polygon information (i.e. Vertex Coords, Diffuse, Specular, Texcoord...etc)
      Message 2 of 9 , Sep 24 7:29 PM
        Hi there,

        Well the way I do it is create my own
        vertex buffer that push all the polygon information
        (i.e. Vertex Coords, Diffuse, Specular,
        Texcoord...etc)
        into a stack that exists in the vertex buffer class.
        The vertex buffer class has almost the same functions
        as glVertex3f, glColor3f, glTexcoord...etc.

        But once everything is added i only call one function
        and it runs through the stack of vertex information
        with a recursive function and generates and array
        of vertices that i can then use to render with just
        one call. by my knowledge, this is byfar one of
        the best ways of doing it. but its up to you to
        decide.

        I mean, try my method and see how it works out. let me
        know if you need any help.

        my email address is: jm@...


        good luck,
        -JM.





        --- Gregor Brunmar <gregor.brunmar@...> wrote:
        > Hi there everyone :)
        >
        > Here comes another of my (for you maybe trivial)
        > questions :)
        >
        > Simple: How can I store vertices and faces in memory
        > so they can be
        > uploaded to modern graphic cards in a near optimal
        > way?
        >
        > Complex: I've thought of two ways of doing this. The
        > application in mind
        > is a portal driven engine. Sollution number:
        > 1) Allocate one big vertex buffer for each
        > texture/shader, and store
        > all vertices that uses that texture.
        > 2) Have each object (including each sector) have
        > its own vertex buffer
        > (sorted by texture).
        >
        > Positive for sollution 1) A good way of sending much
        > information to the
        > gfx card at once - one draw-call / texture / frame
        > Negative for sollution 1) Each object needs to copy
        > its vertices to the
        > vertex buffer each frame
        >
        > Positive for sollution 2) No copying to the vertex
        > buffer is involved
        > Negative for sollution 2) Multiple draw-calls /
        > texture / frame - not
        > good
        >
        > Is there any "standard" way of doing this or is this
        > something of a
        > "program secret" that nobody wants to talk about? :)
        >
        > Thanks in advance!
        > Gregor
        >
        >
        > -----
        > FAQ and OpenGL Resources at:
        >
        >
        http://www.geocities.com/SiliconValley/Hills/9956/OpenGL
        >
        > --
        > Author: Gregor Brunmar
        > INET: gregor.brunmar@...
        >
        > Fat City Network Services -- 858-538-5051
        > http://www.fatcity.com
        > San Diego, California -- Mailing list and web
        > hosting services
        >
        ---------------------------------------------------------------------
        > To REMOVE yourself from this mailing list, send an
        > E-Mail message
        > to: ListGuru@... (note EXACT spelling of
        > 'ListGuru') and in
        > the message BODY, include a line containing: UNSUB
        > OPENGL-GAMEDEV-L
        > (or the name of mailing list you want to be removed
        > from). You may
        > also send the HELP command for other information
        > (like subscribing).


        __________________________________
        Do you Yahoo!?
        Yahoo! SiteBuilder - Free, easy-to-use web site design software
        http://sitebuilder.yahoo.com
        -----
        FAQ and OpenGL Resources at:
        http://www.geocities.com/SiliconValley/Hills/9956/OpenGL

        --
        Author: JM
        INET: jm_1983310@...

        Fat City Network Services -- 858-538-5051 http://www.fatcity.com
        San Diego, California -- Mailing list and web hosting services
        ---------------------------------------------------------------------
        To REMOVE yourself from this mailing list, send an E-Mail message
        to: ListGuru@... (note EXACT spelling of 'ListGuru') and in
        the message BODY, include a line containing: UNSUB OPENGL-GAMEDEV-L
        (or the name of mailing list you want to be removed from). You may
        also send the HELP command for other information (like subscribing).
      • Parveen Kaler
        OGRE just added hardware buffer support. You can check out how they do it. http://ogre.sourceforge.net ... FAQ and OpenGL Resources at:
        Message 3 of 9 , Sep 25 11:29 AM
          OGRE just added hardware buffer support. You can check out how they do it.
          http://ogre.sourceforge.net

          On Wed, 24 Sep 2003 18:29:40 -0800 OPENGL-GAMEDEV-L@... wrote:
          > Hi there,
          >
          > Well the way I do it is create my own
          > vertex buffer that push all the polygon information
          > (i.e. Vertex Coords, Diffuse, Specular,
          > Texcoord...etc)
          > into a stack that exists in the vertex buffer class.
          > The vertex buffer class has almost the same functions
          > as glVertex3f, glColor3f, glTexcoord...etc.
          >
          > But once everything is added i only call one function
          > and it runs through the stack of vertex information
          > with a recursive function and generates and array
          > of vertices that i can then use to render with just
          > one call. by my knowledge, this is byfar one of
          > the best ways of doing it. but its up to you to
          > decide.
          >
          > I mean, try my method and see how it works out. let me
          > know if you need any help.
          >
          > my email address is: jm@...
          >
          >
          > good luck,
          > -JM.
          >
          >
          >
          >
          >
          > --- Gregor Brunmar <gregor.brunmar@...> wrote:
          > > Hi there everyone :)
          > >
          > > Here comes another of my (for you maybe trivial)
          > > questions :)
          > >
          > > Simple: How can I store vertices and faces in memory
          > > so they can be
          > > uploaded to modern graphic cards in a near optimal
          > > way?
          > >
          > > Complex: I've thought of two ways of doing this. The
          > > application in mind
          > > is a portal driven engine. Sollution number:
          > > 1) Allocate one big vertex buffer for each
          > > texture/shader, and store
          > > all vertices that uses that texture.
          > > 2) Have each object (including each sector) have
          > > its own vertex buffer
          > > (sorted by texture).
          > >
          > > Positive for sollution 1) A good way of sending much
          > > information to the
          > > gfx card at once - one draw-call / texture / frame
          > > Negative for sollution 1) Each object needs to copy
          > > its vertices to the
          > > vertex buffer each frame
          > >
          > > Positive for sollution 2) No copying to the vertex
          > > buffer is involved
          > > Negative for sollution 2) Multiple draw-calls /
          > > texture / frame - not
          > > good
          > >
          > > Is there any "standard" way of doing this or is this
          > > something of a
          > > "program secret" that nobody wants to talk about? :)
          > >
          > > Thanks in advance!
          > > Gregor
          > >
          > >
          > > -----
          > > FAQ and OpenGL Resources at:
          > >
          > >
          > http://www.geocities.com/SiliconValley/Hills/9956/OpenGL
          > >
          > > --
          > > Author: Gregor Brunmar
          > > INET: gregor.brunmar@...
          > >
          > > Fat City Network Services -- 858-538-5051
          > > http://www.fatcity.com
          > > San Diego, California -- Mailing list and web
          > > hosting services
          > >
          > ---------------------------------------------------------------------
          > > To REMOVE yourself from this mailing list, send an
          > > E-Mail message
          > > to: ListGuru@... (note EXACT spelling of
          > > 'ListGuru') and in
          > > the message BODY, include a line containing: UNSUB
          > > OPENGL-GAMEDEV-L
          > > (or the name of mailing list you want to be removed
          > > from). You may
          > > also send the HELP command for other information
          > > (like subscribing).
          >
          >
          > __________________________________
          > Do you Yahoo!?
          > Yahoo! SiteBuilder - Free, easy-to-use web site design software
          > http://sitebuilder.yahoo.com
          > -----
          > FAQ and OpenGL Resources at:
          > http://www.geocities.com/SiliconValley/Hills/9956/OpenGL
          >
          > --
          > Author: JM
          > INET: jm_1983310@...
          >
          > Fat City Network Services -- 858-538-5051 http://www.fatcity.com
          > San Diego, California -- Mailing list and web hosting services
          > ---------------------------------------------------------------------
          > To REMOVE yourself from this mailing list, send an E-Mail message
          > to: ListGuru@... (note EXACT spelling of 'ListGuru') and in
          > the message BODY, include a line containing: UNSUB OPENGL-GAMEDEV-L
          > (or the name of mailing list you want to be removed from). You may
          > also send the HELP command for other information (like subscribing).



          -----
          FAQ and OpenGL Resources at:
          http://www.geocities.com/SiliconValley/Hills/9956/OpenGL

          --
          Author: Parveen Kaler
          INET: pk@...

          Fat City Network Services -- 858-538-5051 http://www.fatcity.com
          San Diego, California -- Mailing list and web hosting services
          ---------------------------------------------------------------------
          To REMOVE yourself from this mailing list, send an E-Mail message
          to: ListGuru@... (note EXACT spelling of 'ListGuru') and in
          the message BODY, include a line containing: UNSUB OPENGL-GAMEDEV-L
          (or the name of mailing list you want to be removed from). You may
          also send the HELP command for other information (like subscribing).
        Your message has been successfully submitted and would be delivered to recipients shortly.