RE: glBegin/glEnd faster than glDrawElements?
"William Woodbury" <[email protected]> Mon, 07 Nov 2005 02:03:25 -0800
| Newsgroups | gmane.games.devel.opengl |
|---|---|
| Organization | Fat City Network Services, San Diego, California |
| Message-ID | <[email protected]> |
I was using my frame rate output as the bench mark, and using DrawElements was alot slower. It is a drawing a LOD mesh, so I have to upload the data each frame. Does that kill any performance benefit? The fastest performance I seem to be able to get is using tri strips and glBegin glEnd. -----Original Message----- From: [email protected] [mailto:[email protected]]On Behalf Of Andreas Umbach Sent: 06 November 2005 10:18 To: Multiple recipients of list OPENGL-GAMEDEV-L Subject: Re: glBegin/glEnd faster than glDrawElements? On 11/1/05, William Woodbury <[email protected]> wrote: Hello, Under what circumstances is this possible? I have arrays of point, normal, and uv data which represent a grid. I also have an array which represents my primatives (triangles, 2 for each grid square). When I draw the entire array using glDrawElements, it is slower than when I use glBegin/glEnd and loop through the entire grid. How is this possible? That entirely depends on your benchmarking. Note that you can't just measure the time of excecution from glBegin to glEnd(), because the driver's likely not done any work between those, except preparing & filling some command queue. The only way to benchmark this is to measure the impact the change has on your frame rate. Also, make sure you have a sane frame rate (e.g. between 10 - 50 fps, vsync off, etc.etc.) otherwise other factors can throw your benchmarking way off. - Andreas -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.362 / Virus Database: 267.12.8/162 - Release Date: 05/11/2005