Original Post
The lights in OpenGL are based on the constants GL_LIGHTi, and in my light class I was hoping to return a handle to the light just created. Like... myLight = new lightClass(); Only to do this, within my constructor I would need to find a free light (I could store which lights have been created in an array or something), but for that I need to be able to dynamically change the i in the constant (ie. loop through the constants GL_LIGHT0, GL_LIGHT1, GL_LIGHT2 etc.). Is there anyway to do this? If there isn't I can always just pass a light constant into the constuctor, but I just thought this way would be in-keeping with the rest of my classes. Thanks.