Results 1 to 4 of 4

Thread: How can I put some light?

  1. #1
    Junior Member Newbie
    Join Date
    Jun 2002
    Location
    provo,utah,USA
    Posts
    16

    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. #2
    Junior Member Newbie
    Join Date
    Aug 2002
    Posts
    24

    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. #3
    Junior Member Newbie
    Join Date
    Jun 2002
    Location
    provo,utah,USA
    Posts
    16

    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. #4
    Senior Member Regular Contributor
    Join Date
    Feb 2002
    Posts
    374

    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 .

Similar Threads

  1. What's different between ambient light and diffuse light,?
    By reader1 in forum OpenGL: Basic Coding
    Replies: 11
    Last Post: 06-12-2015, 08:41 AM
  2. How to add a light if white ambient light is active?
    By FedorSymkin in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 11-21-2014, 03:40 PM
  3. Positioned spot light - white light appearing from nowhere behind
    By windchine in forum OpenGL: Basic Coding
    Replies: 9
    Last Post: 08-03-2012, 02:30 AM
  4. Fixed light and moving spot light with the mouse
    By Jorcelangelo in forum OpenGL: Basic Coding
    Replies: 0
    Last Post: 04-18-2012, 09:56 PM
  5. Point light VP -> Spot light VP: ?
    By Freelancer in forum OpenGL: Advanced Coding
    Replies: 1
    Last Post: 01-27-2004, 11:43 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean