Most effecient way to draw a sphere

Sorry if this seems like a stupid question, but my boss wants me to ask. I am trying to draw as many spheres as possible at one time. Currently using gluSphere(*,3,2), I can display about 300,000 spheres (RAM 1GB). If I use glVertex3d and GL_POINT_SMOOTH, they look spherical and I can get about 3,000,000, but they don’t function correctly when I zoom in on them (they get smaller).
Are there any functions, settings, etc. that I am missing that would allow me to draw more (properly functioning) spheres in a windows openGL view?

If you are drawing points, it’s not a surprise that that they don’t behave like spheres.

Why do you need to draw so many (tiny) spheres? Is this a particle system?

Originally posted by endash:
If you are drawing points, it’s not a surprise that that they don’t behave like spheres.
Why do you need to draw so many (tiny) spheres? Is this a particle system?

I understand that points won’t work. We are trying to visualize the sampling of a 3D space and want to “show” the millions of sampling positions as spheres in that 3D space. gluSphere seems to require so much memory that on a 1GB RAM machine the view fails with around 300,000 spheres using the minimal gluSphere(3,2), and at around 100,000 spheres using gluSphere(6,4). Just wanted to make sure there wasn’t an option or alternative that I was missing.
Thanks
Les

Why create 300000 spheres when you can create 1 and render it as many times as you want.
Use display lists or VBO.

If your driver allows you can use GL_ARB_point_parameters extension (see OpenGL Extensions Registry for description). It was specially disigned for this kind of application.

Or … just a simple billboarded quad with a sphere texture on it (e.g. particle system).

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.