picogl.backend.gl.light
This module provides an implementation for controlling OpenGL light sources using the GLFixedFunctionCapability and GLLightParameter enumerations.
It includes a utility static method to configure light properties via OpenGL functions.
Classes
Represents a light source in an OpenGL application. |
Module Contents
- class picogl.backend.gl.light.GLLightSource[source]
Represents a light source in an OpenGL application.
This class provides functionality to control OpenGL fixed-function pipeline lighting properties. It includes methods for configuring specific lighting parameters such as diffuse, ambient, or specular components using OpenGL functions.
- static lightf(light: picogl.backend.gl.capability.GLFixedFunctionCapability, pname: picogl.backend.gl.state.fill.GLLightParameter = GLLightParameter.DIFFUSE, params: Sequence[float] = None)[source]
Sets the parameters for a light source in OpenGL fixed-function pipeline.
The function sets specific parameters for a given light source by calling the OpenGL glLightfv function.
- Parameters:
light – The light source identifier as a GLFixedFunctionCapability.
pname – The light’s parameter to be set, specified as a GLLightParameter. Defaults to GLLightParameter.DIFFUSE.
params – A sequence of floats representing the values of the parameter being set. Defaults to None.