texture & light

here is my problem : i can load some sphere (they are a solar system), no problem.
aside, i can load a tga texture, no problem

but when i want both at the same time, i get the planet reder, but the texture is so so dark that i almost see it…

so the problem would be the render of a light on a texture… if anybody can help great thx

wizzo

hi there,
i had a similar problem with the rendering of a terrain. when i turned the lights on, pooof, all the land became dark. U simply have to supply the vertex normals for every vertex of the sphere. Boring but necessary. Lemme now if that was of any help. Bye and good luck, the Gunslinger

ok thx
the problem is that i am a real beginner, and that i don’t know how to do the normal to a sphere… can you help me doing it (i used glut for the sphere) ?
thx for your help, really - now if i dont know how to solve the problem, i know what it is which is good =D

wizzo

Part of you problem maybe is that glutSolidSphere does not have any texture coors, only normals.

If you want to use a texture can use gluSphere and have it create normals and texture coords for you.

example:

sphere = gluNewQuadric();
gluQuadricDrawStyle( sphere, GLU_FILL);
gluQuadricNormals( sphere, GLU_SMOOTH); // Normals setting for glu objects
gluQuadricOrientation( sphere, GLU_OUTSIDE);
gluQuadricTexture( sphere, GL_TRUE); // Create texture coords.

If you want the complete code, look at glball demo on my website,uses glut for window creation and gluSphere:
www.angelfire.com/linux/nexusone/

Originally posted by wizzo:
[b]ok thx
the problem is that i am a real beginner, and that i don’t know how to do the normal to a sphere… can you help me doing it (i used glut for the sphere) ?
thx for your help, really - now if i dont know how to solve the problem, i know what it is which is good =D

wizzo [/b]

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

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

hum… gluquadric is to map the texture to the shere right ? my original problem was to apply a texture to a square, behind the sphere but i couldnt map a texture to a sphere too, so thx, that helped me too =) i’m gonna try that
wizzo