Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 5 of 5

Thread: lightning effect

  1. #1
    Junior Member Newbie
    Join Date
    Feb 2003
    Location
    hyderabad,ap,india
    Posts
    7

    lightning effect

    how to have lightning effect in my application. I am using gl functions and building the application in win 32 environment. Moreover how to create multiple light sources.

    please help me asap or give me some links of nice tutorials abt this.

    sikander
    sikander
    IIIT Hyd.,India

  2. #2
    Member Regular Contributor
    Join Date
    Aug 2000
    Location
    Turin
    Posts
    258

    Re: lightning effect

    Do u mean lighting or lightning ??
    Of course OGL doesn't have any lightning functions..
    For lighting it depends a lot on what kind of result you want to achieve.
    Just set the right light/material parameters and siwthc on light with glEnable(GL_LIGHTING)
    Try searching for glLight and glMaterial specs.

    Formore advanced results better to use per pixel lighting and vertex/fragment programs, but this is a more "advanced" feature.
    [rIO^sPINNING kIDS] - rio@nospam.spinningkids.org

    -/- This is a signature virus. Add it to your signature. Help it spreading! -/-

  3. #3
    Junior Member Newbie
    Join Date
    Feb 2003
    Location
    hyderabad,ap,india
    Posts
    7

    Re: lightning effect

    sorry i mean lighting. can give me some example code for lighting effect and how to put multiple light sources.
    some links ....
    sikander
    IIIT Hyd.,India

  4. #4
    Senior Member OpenGL Guru
    Join Date
    Jun 2000
    Location
    Gastonia, NC, USA
    Posts
    2,070

    Re: lightning effect

    This site is a good place to start:

    nehe.gamedev.net


    Originally posted by sikander:
    how to have lightning effect in my application. I am using gl functions and building the application in win 32 environment. Moreover how to create multiple light sources.

    please help me asap or give me some links of nice tutorials abt this.

    sikander

  5. #5
    Junior Member Regular Contributor
    Join Date
    Feb 2003
    Location
    Westerville, Oh, USA
    Posts
    201

    Re: lightning effect

    Try the FAQ (http://www.opengl.org/developers/faq....html#indx0180) or a basic OpenGL book, like the Programmers Guide (aka Red Book) or SuperBible.

Posting Permissions

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