shogo2040

01-19-2001, 12:04 AM

if you scale a sphere created with glutSolidSphere using glScale, the lighting gets ruined. But if you scale your glutSolidSphere via parameter (radius) then everything is fine and lighting is perfect.

Unfortunately, scaling with the radius won't make your sphere stretch along a specific axis (to form something like an ellipsoid).

so I would assume that glScale is the only answer? if so, then how do you use glScale without ruining the normals defined inside the glutSolidSphere function?

if this approach is not possible, then how would you rewrite glutSolidSphere to be more flexible such that you can scale along a specific axis via paramters:

glutSolidEllipsoid(x_axis, y_axis, z_axis);

Shogo2040

Unfortunately, scaling with the radius won't make your sphere stretch along a specific axis (to form something like an ellipsoid).

so I would assume that glScale is the only answer? if so, then how do you use glScale without ruining the normals defined inside the glutSolidSphere function?

if this approach is not possible, then how would you rewrite glutSolidSphere to be more flexible such that you can scale along a specific axis via paramters:

glutSolidEllipsoid(x_axis, y_axis, z_axis);

Shogo2040