View Full Version : Efficiency
I have some code that uses the Arc-ball routine (NeHe tutorials) to rotate around the frame using the mouse. However I find that without hardware acceleration the visualization is impossibly slow and I cannot move around the frame for a large number of draw elements. I am drawing several thousand spheres - maybe 8k of them (fairly roughly using glusphere [not too many slices per sphere]). Is there any obvious guidance for speeding things up somewhat?
I have dropped the resolution - but cannot believe how slow it loads. I have not posted the code here, but will if requested because there is quite a bit of it. Is there anything that can easily be done to speed things up?
Thanks in advance.
10-26-2009, 03:52 PM
However I find that without hardware acceleration the visualization is impossibly slow
Try enabling hw acceleration may be? No, seriously, on what kind of platform are you working on to not benefit from any acceleration from the hardware?
I am afraid that the only solution is to limit the amount of data displayed per frame. One idea would be to not draw the entire geometry when rotating it, i.e drawing a gizmo or using different level of details. But first identify the source of the bottleneck. Perhaps it is just a matter or bandwidth or something...
I just had a quick look at mesa's glusphere(..) version
+ it uses immediate plus draws the sphere in parts i.e. the ends as triangle fans + the center.
Youre better off with your own sphere drawing function that draws it with a single triangle list.
Another possiblity is to use gluSphere(..) but create a display list of it + just call the list 8k times (which should still be slow but a lot faster than what u have now)
I am running on a rather elderly laptop with no access to a good machine anymore - which had an nvidia card. This one does not - its just so painfully slow.
I'll take a look at using gluSphere and see what effect that has and report back!
Powered by vBulletin® Version 4.2.2 Copyright © 2015 vBulletin Solutions, Inc. All rights reserved.