How to time v3f, etc. (was: n3f v3f timing)

Kurt Akeley kurt at cashew.asd.sgi.com
Thu May 2 02:15:07 AEST 1991


In article <1991Apr29.173254.18921 at dsd.es.com>, pmartz at undies.dsd.es.com (Paul Martz) writes:

|> Suppose I'm trying to time my performance. Let's say I get the current
|> clock time in milliseconds, then I send down several bgnpoly()'s,
|> v3f()'s, and endpoly()'s. Then I get the clock time in milliseconds
|> again, subtract it from the start time, and divide by the number of
|> polygons.
|> 
|> What have I just timed? Have I timed copying data to a fifo, or have I
|> timed the actual drawing? Does calling endpoly() block until the fifo
|> is empty? If not (and I hope not), what gl function can I call which
|> will? (swapbuffers() wouldn't be what I'd want, because I don't want
|> buffer swaps included in the timing.)

Yes, you've timed the transfer of the data to the fifo.  To wait until all
drawing is complete, call GL routine finish().  To avoid corruption resulting
from the delay of the finish command itself, run your tests for one second
or more.

-- Kurt



More information about the Comp.sys.sgi mailing list