self illuminating objects??
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
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 ?
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
- seb
Well, if that is what he looks for, that''s simple :
...
glEnable(GL_LIGHTING);
glEnable(GL_LIGHT0);
drawMySphere();
glDisable(GL_LIGHTING);
...
...
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.
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.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement