OpenGL configuration for a particular canvas.
Use Config.match to obtain an instance of this class.
Note
Since pyglet 1.2
Variables: | canvas – The canvas this config is valid on. |
---|
Constructor:
Methods:
compatible(canvas) create_context(share) Create a GL context that satisifies this configuration. get_gl_attributes() Return a list of attributes set on this config. is_complete() match(canvas) Return a list of matching complete configs for the given canvas.
Attributes:
debug forward_compatible major_version minor_version
Create a GL context that satisifies this configuration.
Parameters: | share (Context) – If not None, a context with which to share objects with. |
---|---|
Return type: | Context |
Returns: | The new context. |
Methods
- CanvasConfig.get_gl_attributes()
Return a list of attributes set on this config.
Return type: list of tuple (name, value) Returns: All attributes, with unset attributes having a value of None.
- CanvasConfig.match(canvas)
Return a list of matching complete configs for the given canvas.
Note
Since pyglet 1.2
Parameters: canvas (Canvas) – Display to host contexts created from the config. Return type: list of CanvasConfig Attributes
- CanvasConfig.debug = None
- CanvasConfig.forward_compatible = None
- CanvasConfig.major_version = None
- CanvasConfig.minor_version = None