On Jan 26, 7:14 pm, Tristam MacDonald <[email protected]> wrote: > All of your points are valid in other contexts, but in chasing this elusive > performance argument, you are missing my larger point that ***none of this > applies to your example wave program***. > > Given the size of window you are rendering the wave program to, a map size > of 128x128 results in individual triangles that are on average the same size > as an onscreen pixel. > > By the time you increase to a map size of 1024x1024, you are rendering an > average of 64 triangles *per onscreen pixel*.
> Which means you have three performance problems: > > 1. copying 1,000,000 vertices from a texture into a vertex buffer. > 2. transforming and clipping 1,000,000 vertices. > 3. somewhere on the order of 200x overdraw. > > If you were to switch to relief mapping on a single quad, vertex texture > fetch on a constant 128x128 grid, or your existing copy scaled down to > 128x128, you would: > > 1. eliminate the copy entirely, or at least reduce it to a constant (and > small) cost > 2. reduce vertex processing to a constant and small cost > 3. eliminate the massive overdraw > > In essence, the only performance issue your program is suffering from is > that it performs a huge amount of very expensive work, *with no discernible > effect to the user*. As the old adage goes, "the fastest code is the code > that isn't run"... My gForce 8800 claims 64GB/s memory bandwith, my wave.py test manages just about 75MB/s (disregarding drawing). So somehow OpenGL/nvidia/ khronos/extensions/whatever manages to retard my byte troughput performance by a factor of roughly 1000... The point isn't that wave.py could be more efficient somehow, the point is that as a test how fast you can push bytes around on your GPU using OpenGL, it's an utter disaster. -- You received this message because you are subscribed to the Google Groups "pyglet-users" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/pyglet-users?hl=en.
