Results 1 to 4 of 4

Thread: Textures unaffected by object lighting

  1. #1
    Member Newbie Carl Jokl's Avatar
    Join Date
    Jan 2007
    Location
    Redditch, Worcestershire, United Kingdon
    Posts
    47

    Textures unaffected by object lighting

    I am having trouble with my textures being seemingly unaffected by the scene lighting. I have looked at another example program using matierials and lighting where it seems to light correctly. I have compared my program to this but cannot see any real difference except perhaps with the sequence of certain commands getting called. I have a scene with different textures and materials which get applied during the drawing process. I wonder if the problem is something to do with sequencing.

    Any ideas?
    Check out my dimensions, length, width and for a limited time only..depth!

  2. #2
    Member Contributor
    Join Date
    Jun 2004
    Posts
    62

    Re: Textures unaffected by object lighting

    copy/paste the code that works into the program that doesn't work

    then start tweaking it until it looks like the code that does't work... along the way u'll find the bug

  3. #3
    Senior Member Frequent Contributor
    Join Date
    May 2005
    Location
    Prague, Czech Republic
    Posts
    913

    Re: Textures unaffected by object lighting

    What texture environment do you use? This often happens when evnironment that ignores previous color (e.g. GL_REPLACE) is used instead of the GL_MODULATE.

  4. #4
    Member Newbie Carl Jokl's Avatar
    Join Date
    Jan 2007
    Location
    Redditch, Worcestershire, United Kingdon
    Posts
    47

    Re: Textures unaffected by object lighting

    Sorry. It looks like I managed to get this working now in the mean time. I must admit though that lighting can be a pain and things don't neccecarily behave as I might have predicted. I will have to put my OpenGL work on hold for a bit as I have other pressing coursework.
    Check out my dimensions, length, width and for a limited time only..depth!

Similar Threads

  1. Lighting a single object
    By Ledivin in forum OpenGL: Basic Coding
    Replies: 4
    Last Post: 12-04-2010, 06:18 PM
  2. Lighting rotating with object? Eh?
    By in forum OpenGL: Basic Coding
    Replies: 3
    Last Post: 03-26-2006, 10:19 AM
  3. only lighting the front of an object
    By jackhollow in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 11-03-2003, 02:32 AM
  4. lighting an object in 3d world, Help
    By in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 04-04-2002, 04:48 PM
  5. Why does the Lighting makes object B&
    By KC in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 10-27-2000, 11:39 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