Short vsn:
I can't get my lighting to "turn on" WRT to my IndexedTriangleStripArray
(a "mesh" style terrain) and NormalsGenerator.
Code snippet:
IndexedTriangleStripArray terrain =
new IndexedTriangleStripArray (vCount,
IndexedTriangleStripArray.COORDINATES,
iCount,
siCounts
);
// Set up coordinates
[snip]
// set up indecies
[snip]
GeometryInfo gi = new GeometryInfo (terrain);
NormalGenerator ng = new NormalGenerator();
ng.generateNormals (gi);
gi.recomputeIndices();
I've verified that lighting is on by placing a few spheres around the
terrain, and they light correctly. In addition, the terrain displays
correctly and, in fact, even textures nicely (different bit of code.)
Btw, for lighting-testing, I'm turning off textures, as that seems to
interfere with lighting on my test-spheres. (Different question :)
Any hints?
Thanks!
--
Please take off your pants or I won't read your e-mail.
I will not, no matter how "good" the deal, patronise any business which
sends
unsolicited commercial e-mail or that advertises in discussion newsgroups.


|