Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!mips!sgi!shinobu!odin!cashew.asd.sgi.com!kurt From: kurt@cashew.asd.sgi.com (Kurt Akeley) Newsgroups: comp.sys.sgi Subject: Re: How to time v3f, etc. (was: n3f v3f timing) Message-ID: <1991May1.161507.26341@odin.corp.sgi.com> Date: 1 May 91 16:15:07 GMT References: <15146@darkstar.ucsc.edu> <1991Apr29.154346.6866@odin.corp.sgi.com> <1991Apr29.173254.18921@dsd.es.com> Sender: news@odin.corp.sgi.com (Net News) Reply-To: kurt@cashew.asd.sgi.com (Kurt Akeley) Organization: sgi Lines: 20 In article <1991Apr29.173254.18921@dsd.es.com>, pmartz@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