if (context.getCapabilities().isOpenGL1_2Supported()) {
setSpecularControl(state.getSeparateSpecular(), record);
}
for (int i = 0, max = state.getNumberOfChildren(); i < max; i++) {
final Light light = state.get(i);
LightRecord lr = record.getLightRecord(i);
// TODO: use the reference to get the lightrecord - rherlitz
if (lr == null) {
lr = new LightRecord();
record.setLightRecord(lr, i);
}
if (light == null) {
setSingleLightEnabled(false, i, record, lr);
} else {
if (light.isEnabled()) {
setLight(i, light, state, record, lr);
} else {
setSingleLightEnabled(false, i, record, lr);
}
}