Re: glDrawElements much slower than glDrawArrays

Russell Strong <[email protected]>
Newsgroups gmane.comp.video.mesa3d.user
Message-ID <[email protected]>
Russell Strong <russell <at> strong.id.au> writes:

> 
> Hi,
> 
> As a learning exercise I'm rendering a uv sphere with glDrawArrays using buffer
> objects, I then change this over to glDrawElements with indices 0,1,2,...n also
> in a buffer object. What I found was that the glDrawElements version was
> consuming 16% cpu compared with 4% for glDrawArrays.
> 
> I've looked around and can't seem to find any reason why it would be slower. 
> Both "should" be storing everything in the gpu's ram as far as I can see, but I
> suspect the draw elements version is not.
> 
> I'm using an older version of mesa 7.11.2 ( Fedora 16 ) intel driver, anyone
> remember any problems with glDrawElements then?
> 


I've upgraded to a more recent version of mesa 8.0.4 ( fedora 17 ).  The problem
has gone away and I now see a negligible difference between glDrawArrays and
glDrawElements when looking at it with intel_gpu_time
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.