PDA

View Full Version : Reversing normals for glutSphere



ShinGouki
05-03-2003, 06:37 PM
Hi does anyone know if its possible for me to reverse the normals on a glutSphere so that they are all pointing inwards.

Im trying to model of the Sun for a solar system i have a created, and figured that by reversing the normals i should hopefully be able to create a simple glowing effect

To be honest i wanted to make my own Sphere function so any ideas on an easy way to do that *no C++ classes please, prefarbly in C*
would be really appreciated http://www.opengl.org/discussion_boards/ubb/smile.gif

Thanks in advance

shinpaughp
05-03-2003, 06:51 PM
I assume that you mean gluSphere... use gluQuadricOrientation with GLU_INSIDE. I don't think it will give you the effect you are looking for.


[This message has been edited by shinpaughp (edited 05-03-2003).]

ShinGouki
05-03-2003, 07:06 PM
what parameters do i pass to a gluSphere??

im actually using glutSolidSphere at the moment which takes

glutSolidSphere(float, int, int); //radius, slices, stacks

is gluSphere essentially the same???

and your probably right about the effect not looking good, i want to have a light shine from the sun so that everything is lit in the scene from the sun as some kind of spherical spotlight to light the scene....

anyone got any ideas on a good way to do this, right now i can't seem to achieve any thing even half decent looking, but it all looks so bland with just ambient light......

shinpaughp
05-03-2003, 07:42 PM
A billboarded textured quad with blending might look good. You might want to check out tuts on some of the sites like nehe or gamedev.net. Look for sky boxes to get some idea.

ShinGouki
05-03-2003, 07:44 PM
k thanks

Ill check them out

nexusone
05-05-2003, 11:21 AM
No, glut___Sphere and gluSphere are only the same in respect to being a sphere.

You have many more options with gluSphere then with glut____Sphere.

Things like the texture map generation in which you can not do with glut____Sphere.

As for C*, did you mean C# (net)?

Which C# is relatively new and not used much for games yet, not sure if you would find sphere generating code in C#.



Originally posted by ShinGouki:
what parameters do i pass to a gluSphere??

im actually using glutSolidSphere at the moment which takes

glutSolidSphere(float, int, int); //radius, slices, stacks

is gluSphere essentially the same???

and your probably right about the effect not looking good, i want to have a light shine from the sun so that everything is lit in the scene from the sun as some kind of spherical spotlight to light the scene....

anyone got any ideas on a good way to do this, right now i can't seem to achieve any thing even half decent looking, but it all looks so bland with just ambient light......



[This message has been edited by nexusone (edited 05-05-2003).]