Original Post
Just working on a vertex program based lighting system. I'm just wondering how to support multiple lights since the GL_VERTEX_PROGRAM_ARB doesn't support looping (as far as i know). I can easily pass several points to the vertex program indicating light locations, but how would i iterate through these lights. If it where a fixed number of lights that I know when writing the vertex program I could just cut and paste the code for each light and accumulate it in the result, but I can't assume that the number of lights is known at write time. I also realize that the specs for GL_VERTEX_PROGRAM_ARB specify: " Vertex programs execute a finite fixed sequence of instructions with no branching or looping." But their must be a way to handle an unknown amount of imput at run time. Thanks for any help or suggestions
[edited by - _walrus on December 17, 2002 2:23:42 PM]