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

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.

sorry i mean lighting. can give me some example code for lighting effect and how to put multiple light sources.
some links …

This site is a good place to start:

nehe.gamedev.net

Originally posted by sikander:
[b]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[/b]

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