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!

Signature
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.
Miss Elaine Eos - 23 Mar 2007 07:35 GMT
> Short vsn:
>
> I can't get my lighting to "turn on" WRT to my IndexedTriangleStripArray
> (a "mesh" style terrain) and NormalsGenerator.
>
> Code snippet:
Snip. Nevermind, I think I got it. For the 2nd time this week, the
secret seems to be to flail for a while, then ask. Less than an hour
after hitting send, the answer appears! :D
After I get my code cleaned up a bit, I'll post it as an example to
other n00bs with similar problems.
It had to do with getting the material & textureMode right (MODULATE).

Signature
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.