#138231 - ritz - Tue Aug 21, 2007 3:29 pm
Does anyone know if you can call/set the light vector (i.e. glLight) inside glBegin(GL_TRIANGLE_STRIP)?
#138257 - omaremad - Tue Aug 21, 2007 9:56 pm
You cant, break your mesh down into smaller chunks.
#138260 - ritz - Tue Aug 21, 2007 11:31 pm
So, just so I understand this correctly, I'll need to set the light vector outside any glBegin()? No per-vertex lighting? So the best I can do is to set the light vector followed by a glBegin(GL_TRIANGLES) for each poly/triangle? I already have it working with STRIPS and all 4 lights on hardware (emulators won't run it)... I'm actually just having problems within really snug ranges.
#138284 - omaremad - Wed Aug 22, 2007 8:38 am
Per vertex lighting works without defining light vectors at each vertex, if you want to change the lighting setup mid mesh just start a new mesh with the light settings outside the glDraw()
#138296 - ritz - Wed Aug 22, 2007 2:35 pm
Thanks for the help. What I think I meant was positional light, not per-vertex light.. thanks for clarifying.
#138302 - Sunray - Wed Aug 22, 2007 6:26 pm
You can calculate the lighting yourself and apply it with vertex colors. That is probably easier than using the built-in lighting... :)
#138319 - silent_code - Wed Aug 22, 2007 10:58 pm
dito.
it's been a while, but if i remember corrently, when setting material colors per vertex instead of vertex colors (though i can't remember if that was possible on the nds), you can still use the hw lights for the more limited stuff.
happy coding.