self illuminating objects??

Started by
4 comments, last by Kiroke 22 years, 3 months ago
Is there a way to make a textured object (like a gluSphere) illuminated without lights?? In 3D studio Max you could do that by setting a simple parameter in the material editor but now i cant find the right command in openGL. Which i had an openGL graphic interface like 3D studio Max:-) Thx in advance
Kirokewww.geocities.com/kiroke2
Advertisement
What do you mean by "illuminated without lights" ?
Do you want to see the sphere brighter on one side and more and more darker one the other side ?
Or do you *just* want you sphere not to be black ?
I think he means that you''d see just the sphere but it wouldn''t cast light on nearby objects.

- seb
Well, if that is what he looks for, that''s simple :

...
glEnable(GL_LIGHTING);
glEnable(GL_LIGHT0);
drawMySphere();
glDisable(GL_LIGHTING);
...
Hmm, I would do it the other way round:

glDisable(GL_LIGHTING);
glColor3f(1.0, 0.0, 0.0);
drawMySphere();
glEnable(GL_LIGHTING);

Makes a nice red glowing sphere, all other objects are lit normally.
tried the last thing...worked fine thx!!!

Kiroke

ps: ill try to be more precise in the future:-)
pps: all my questions are related to a little game im trying to make and its alot to think for now(first openGL program ever) so thx alot for ur support
Kirokewww.geocities.com/kiroke2

This topic is closed to new replies.

Advertisement