Page 1 of 3 123 LastLast
Results 1 to 10 of 27

Thread: Bad polys per second...

  1. #1
    Senior Member Regular Contributor
    Join Date
    Jan 2002
    Posts
    204

    Bad polys per second...

    I am looking for something to compare my poly per second count to. The problem is that Iím getting only 2M textured shaded polys a second on a GeForce2 Pro with 64M ram. The card is rated at 25M polys. Now Iím not using display lists, but I am using tristrips. Is there a way to tell if the issue is bandwidth or poly count or what. I guess if there was a chart that said 25M card poly = 20M opengl polys and every vertex uses 100 bytes of bandwith, I would be able to tell if Iím doing something wrong or how to optimize from here. ThanksÖ.

    John.

  2. #2
    Senior Member Regular Contributor
    Join Date
    Jun 2000
    Location
    Karlsruhe, Germany
    Posts
    360

    Re: Bad polys per second...

    Do you use vertex arrays? with GF2 you'll get maximum performance with VAR.

    -Lev

  3. #3
    Senior Member Regular Contributor
    Join Date
    Jan 2002
    Posts
    204

    Re: Bad polys per second...

    No just calls to glVertex, glColor, and glTexCoord.

  4. #4
    Senior Member Regular Contributor
    Join Date
    Jan 2002
    Posts
    204

    Re: Bad polys per second...

    Lets pretend like I was going to use arrays, I would have to use tris and not tristrips right? Also my levels are like 1M+ polys thats nearly 200M of data to load. Is it faster to allow opengl to swap 100 or so large (2M) arrays or to pump data across the agp bus with calls to glVertex etc? I already have the data in the game partitioned in a way that would allow me to do this with some work. But how long will it take to load the arrays? I experimented with arrays a while ago and I remember the load was a little slow. When opengl swaps from video to regular memory will it swap out the least frequently used object (texture, array, etc). Iíll be honest, I donít like not being in control of memory management. Let me know what you think. ThanksÖ.

    John.

  5. #5
    Senior Member Frequent Contributor
    Join Date
    Aug 2000
    Location
    Portsmouth, Hampshire, England
    Posts
    926

    Re: Bad polys per second...

    You can still use tri-strips with vertex arrays.

    If you're pumping soo many polygons across using immediate mode commands, it's not surprising you're not hitting anywhere near top performance.

    If you use standard vertex arrays, the driver has to copy vertex data over to AGP memory every frame. If you use VAR, you can manually control the copying of data over to AGP. Given that you say you have 200 meg of vertex data, your situation is absolutely perfect for using fences also.

    You can use fences (an extension to the VAR extension thing) to know at which point it is safe to start uploading the next part of the vertex array to AGP memory, while the GPU is still rendering..

    You will have to switch to vertex arrays if you want better performance. Immediate mode commands for such huge volumes of data are slow.

    Nutty

  6. #6
    Senior Member Regular Contributor
    Join Date
    Jan 2002
    Posts
    204

    Re: Bad polys per second...

    Nutty do you mean NV_vertex_array_range when you say VAR? I was hoping to stay generic.

    John.

  7. #7
    Senior Member Regular Contributor
    Join Date
    Jan 2002
    Posts
    204

    Re: Bad polys per second...

    Also how do vertext arrays improve performance? it looks like I would still need to call glBegin and glEnd with glArrayElementEXT in between. If the array is still in system memory how does this help? Thanks...

    John.

  8. #8
    Senior Member Regular Contributor
    Join Date
    Jun 2000
    Location
    Karlsruhe, Germany
    Posts
    360

    Re: Bad polys per second...

    With vertex arrays you have no function calling overhead, 10000 calls to glVertex, glNormal, ...
    are replaced with 1 call to glDrawElements.

    -Lev

  9. #9
    Senior Member Frequent Contributor
    Join Date
    Apr 2000
    Posts
    718

    Re: Bad polys per second...

    > do you mean NV_vertex_array_range when you say VAR? I was hoping to stay generic.

    The golden rule of graphics programming is: the more specialized you make it, the faster it runs.

    If you want to stay generic, you won't achieve the same performance.

    Y.

  10. #10
    Senior Member Regular Contributor
    Join Date
    Jan 2002
    Posts
    204

    Re: Bad polys per second...

    Ok last night I tried a few things. I setup a test app that shutoff all of the OpenGL states I set the color to white and then built 3 rendering methods. One method did straight glVertex calls for 100k polys. One method would execute 1000 display lists each with glVertex calls for 100 polys (I did 1000 smaller lists because I had read a few posts on OpenGL.org about performance issues with GeForce and big lists) and finally one method used a vertex array. I built the display lists and arrays on startup, so for the vertex arrays I had only one call in the render method (glDrawArrays). Also I setup a simple loop method that would increment a frame counter then every second come along and pickup the value and reset the counter to 0.

    Ok the results, test 1 straight calls to glVertex: 4 fps, test 2 display lists: 4 fps, test 3 vertex arrays: 4 fps. If this is a bandwidth issue, how is it occurring? 100k polys/frame = 300k verts/frame = (assuming only data put into OpenGL is sent to card (so glVertex3f = (sizeof(float) * 3) = 12)) 3.6mB/frame = 14.4mB/second. AGP bandwidth is like 256mB/second and the card (and mother board) are AGPx4. Lets assume my card is running only AGP and lets use my poly results, to fill the bandwidth the per vertex data would need to be 213 bytes.

    Iíll be the first to admit that I know nothing about how the hardware functions, but in order to take full advantage of OpenGL I realize I need to know more.

    John.

Page 1 of 3 123 LastLast

Similar Threads

  1. 100.000 polys w/lighting @ 30 fps - how?
    By karx11erx in forum OpenGL: Advanced Coding
    Replies: 31
    Last Post: 05-28-2008, 07:20 AM
  2. Polys in the screen
    By in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 08-19-2001, 09:11 PM
  3. Texture only certain Polys...
    By Richelieu in forum OpenGL: Basic Coding
    Replies: 0
    Last Post: 10-11-2000, 05:45 PM
  4. sorting polys
    By frogger in forum OpenGL: Advanced Coding
    Replies: 3
    Last Post: 09-19-2000, 04:53 PM
  5. distorted polys
    By holy_moly in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 04-05-2000, 10:02 AM

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