HELP! I've used OpenGL to create a textured terrain/landscape viewer. Some of the triangular polygons are "sloped" - i.e., not all of the 3 vertices have the same Y coordinate - as opposed to "flat" terrain polygons whose vertices all have the same Y elevation. I would like to create spome visual cues to help distinguish between "flat" vs "sloped" polygons by simulating the effect of sunlight in the real world, where an object's brightness is determined by the angle of the light rays - and thus the amount - of sunlight it receives. From the reading I've done, it seems that OpenGL's DIFFUSE lighting may (??) be the answer, since supposedly it is directional and the light rays are considered parallel, i.e., received by all the polygons as if from a distant source. I've set up OpenGL lighting in my app but so far the results have been very disappointing: there's been no discernable difference in the final rendering. Are there some special steps necessary to integrate lighting effects with textured polygons? Any help (links, code snippets, tutorials..) on this topic would be greatly appreciated. Thanks.




