Render: getGLSLMaterialSetting

getGLSLMaterialSetting(setting)
  • Returns whether or not a GLSL material setting is enabled.

Return Type: 

  • boolean
  • setting enabled: 0 or True
  • setting disabled: 1 or False

setting

  • The GLSL material setting. 
  • Type:  string
  • Material settings:  lights or shaders or shadows or ramps or nodes or extra_textures
    Note:
    • setGLSLMaterialSetting:  0 =  False and 1 = True.
    • getGLSLMaterialSetting:  1 =  False and 0 = True.
    Sample Code

    ################  get the status of the glsl material settings

    # import bge module
    import bge

    # get the render module
    rend = bge.render

    # GLSL lights enabled?
    lightsEnabled = rend.getGLSLMaterialSetting("lights")

    # GLSL shaders enabled?
    shadersEnabled = rend.getGLSLMaterialSetting("shaders")