Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 6 of 6

Thread: Reversing normals for glutSphere

  1. #1
    Junior Member Newbie
    Join Date
    May 2003
    Location
    Dundee, Scotland
    Posts
    13

    Reversing normals for glutSphere

    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

    Thanks in advance

  2. #2
    Advanced Member Frequent Contributor
    Join Date
    Jan 2003
    Location
    Virginia
    Posts
    586

    Re: Reversing normals for glutSphere

    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).]

  3. #3
    Junior Member Newbie
    Join Date
    May 2003
    Location
    Dundee, Scotland
    Posts
    13

    Re: Reversing normals for glutSphere

    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......

  4. #4
    Advanced Member Frequent Contributor
    Join Date
    Jan 2003
    Location
    Virginia
    Posts
    586

    Re: Reversing normals for glutSphere

    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.

  5. #5
    Junior Member Newbie
    Join Date
    May 2003
    Location
    Dundee, Scotland
    Posts
    13

    Re: Reversing normals for glutSphere

    k thanks

    Ill check them out

  6. #6
    Senior Member OpenGL Guru
    Join Date
    Jun 2000
    Location
    Gastonia, NC, USA
    Posts
    2,070

    Re: Reversing normals for glutSphere

    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).]

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •