# Thread: How can I put some light?

1. ## How can I put some light?

Sorry, I am a beginner. I have to implement constant shading for a project without using GL functions. I have to calculate the vector L from my polygon to the light. So my question is: how do I simply put some light (what code should I used to put it at for example at xyz=50,50,50) ?

2. ## Re: How can I put some light?

Put some light without opengl functions !?!?! What ? Well, you can use lightmaps, is that what you want ?

Bye

3. ## Re: How can I put some light?

No, I can use GL functions for the light but I can't use them to implement the shading!

In fact my real question is: how can I just put the light using openGL at xyz= 50,50,50 without showing any shade, just the light.

[This message has been edited by fandecine (edited 11-27-2002).]

4. ## Re: How can I put some light?

Originally posted by fandecine:
No, I can use GL functions for the light but I can't use them to implement the shading!

In fact my real question is: how can I just put the light using openGL at xyz= 50,50,50 without showing any shade, just the light.

[This message has been edited by fandecine (edited 11-27-2002).]
I don't get this. Perhaps I am just stupid, but it sounds like you want to implement the shadings yourself, right? Then why do you need a glFunction to place the light?
So I think placing the light could be done like this:

Light.x:=50; Light.y:=50; Light.z:=50;

(Yeah, I am coding Pascal)

Then calculate the necessary light vectors for your vertices and use glColor for the shading. Hope you are allowed to use smooth shading.

If I got everything wrong just forget my post. I said that i didn't understand your question, so it's not my fault .

#### Posting Permissions

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