gluSphere and quadratic objects
I posted a question a little while ago (entitled "gl animation too slow"). Thanks for all the suggestions.
I have another related question, which might help me speed things up.
In my code, I call gluSphere several thousand times (:eek: ), but I can't allow this to take long.
I see that gluSphere takes a GLUquadricObj as a parameter. Does this mean that the sphere is now stored in this quadratic object? If so, then since I want all my spheres to look the same, can I re-use that objcet, rather than calling gluSphere time and again?
If so, how? I don't know how I would re-render such an object. (Re-render is probably not the word I should use - I hope you understand what I mean).
If it helps, here's my code again:
for(i=0; i<m_ppf; i++)
n = m_ppf*f + i;
X = m_x[n];
Y = m_y[n];
Z = m_z[n];
glTranslated(X, Y, Z);
gluSphere(m_quadratic, m_radius, m_quality+1, m_quality+1);