Results 1 to 3 of 3

Thread: Max light's?

  1. #1

    Max light's?

    what is the max number of lights that opengl can handle?

    or what is the best way to do this:
    i have unlimited house placed on terrain
    and when night comes to world, you can see house windows emit light and road lights too

  2. #2
    Junior Member Newbie
    Join Date
    Oct 2001

    Re: Max light's?

    The max hardware accelerated lights that OpenGL can supports is 8 (GL_LIGHT0-7).

    But, I would strongly suggest researching lightmapping and radiosity. Its a much faster alternative, and allows for as many lights as you want!
    Trent (ShiningKnight)

  3. #3
    Senior Member OpenGL Guru
    Join Date
    Feb 2000

    Re: Max light's?

    It has to support AT LEAST 8 lights, not MAX 8 lights. Any implementation can choose to support as many light as it feels like, as ling as it supports at least 8 lights.

    For implementations that suports more than 8 lights, lights are identified with GL_LIGHT0+n, where n is the light number.

    And the specs doesn't say anything about whether the light must be HW or SW, as long as they are supported, everything is fine.

    To get the number of supported lights, use glGetIntegerv along with GL_MAX_LIGHTS.

    [This message has been edited by Bob (edited 10-03-2001).]

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