Config
(**kwargs)¶Graphics configuration.
A Config stores the preferences for OpenGL attributes such as the number of auxilliary buffers, size of the colour and depth buffers, double buffering, stencilling, multi- and super-sampling, and so on.
Different platforms support a different set of attributes, so these are set with a string key and a value which is integer or boolean.
Variables: |
|
---|
Constructor:
__init__
(**kwargs)¶Create a template config with the given attributes.
Specify attributes as keyword arguments, for example:
template = Config(double_buffer=True)
Methods:
Attributes:
Config.
create_context
(share)¶Create a GL context that satisifies this configuration.
Warning
Deprecated. Use CanvasConfig.create_context.
Parameters: | share (Context) – If not None, a context with which to share objects with. |
---|---|
Return type: | Context |
Returns: | The new context. |
Config.
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 . |
Config.
is_complete
()¶Determine if this config is complete and able to create a context.
Configs created directly are not complete, they can only serve as templates for retrieving a supported config from the system. For example, pyglet.window.Screen.get_matching_configs returns complete configs.
Warning
Deprecated. Use isinstance(config, CanvasConfig)
.
Return type: | bool |
---|---|
Returns: | True if the config is complete and can create a context. |