How to query OpenGL to get the enabled bit for all lights..?

Hello,

I'm looking for a way to query OPENGL to know if a certain light is enabled or not (via glGetBooleanv, glIsEnabled, or.. something else)..

I've seen the docs but no luck for the moment..

Any help would be greatly appreciated.

Tagged:

Answers

  • Hi, there is no function to check if lights are enabled or not. Processing 2.0 uses OpenGL's programmable pipeline, which doesn't have built-in lighting. Lights have to be defined manually with your own uniforms. Processing tries to simplify this a bit by automatically filling some pre-defined uniforms (lightCount, lightPosition, etc.) according to the values you set in the sketch code using pointLight(), spotLight(), etc.

  • Thanks Andres,

    I was talking raw OPEN GL, not P5, should have mentioned it. Found my way around with gl.glIsEnabled(GL2.GL_LIGHTx);

Sign In or Register to comment.