Omni Light?

How can I do an omni light??? I also would appreciate if it don’t have any ambient light or something like that… An omni light which does not color the objects…
Anyone plz…

Hi CyBBe!

I’m still not sure what you mean, but why don’t you try this:

Generate a point light within the center of your world that only emits (wrong spelled, soooorrryyy) white ambient light?

Should do the job.

Regards,

LG

Yes, I understand that I should do like that, but HOW do I do that…?
Code plz…

Code to an Omni light, anyone???

Is this what you’re after?

GLfloat light_pos[]={0.0, 0.0, 0.0, 1.0};
GLfloat light_dif[]={1.0, 1.0, 1.0, 1.0};
GLfloat light_spec[]={1.0, 1.0, 1.0, 1.0};

// setup modelview matrix BEFORE you set lightposition!
glLightfv(GL_LIGHT0,GL_POSITION,light_pos);
glLightfv(GL_LIGHT0,GL_DIFFUSE,light_dif);
glLightfv(GL_LIGHT0,GL_SPECULAR,light_spec);

glLightf(GL_LIGHT0,GL_LINEAR_ATTENUATION,1.0);
glLightf(GL_LIGHT0,GL_QUADRATIC_ATTENUATION,0.5);

glEnable(GL_LIGHTING);
glEnable(GL_LIGHT0);

Values are taken from my app, and you probably have to change them.

Thanx BOB!

You have helped me with many things now, U should have a star…

It’s exactly what I where looking for…