is there any function like isEnabled(GL_LIGHTING); , or is there any way to detect if something is on or off?
isEnabled(GL_LIGHTING);
For global coverage, how about:
glIsEnabled(GL_LIGHTING)
glGet - return the value or values โโof the selected parameter.
glGetBooleanv(GL_LIGHTING,&status)