pyglet.config.gl
- class GLSurfaceConfig
- config: OpenGLUserConfig
- class OpenGLUserConfig
An OpenGL Graphics configuration.
- __init__(
- double_buffer: bool | None = None,
- stereo: bool | None = None,
- buffer_size: int | None = None,
- aux_buffers: int | None = None,
- sample_buffers: int | None = None,
- samples: int | None = None,
- red_size: int | None = None,
- green_size: int | None = None,
- blue_size: int | None = None,
- alpha_size: int | None = None,
- depth_size: int | None = None,
- stencil_size: int | None = None,
- accum_red_size: int | None = None,
- accum_green_size: int | None = None,
- accum_blue_size: int | None = None,
- accum_alpha_size: int | None = None,
- major_version: int | None = None,
- minor_version: int | None = None,
- forward_compatible: bool | None = None,
- debug: bool | None = None,
- transparent_framebuffer: bool | None = None,
- api: GraphicsAPI = GraphicsAPI.OPENGL,
- accum_alpha_size: int | None = None
Bits per pixel devoted to the alpha component in the accumulation buffer. Deprecated.
- accum_blue_size: int | None = None
Bits per pixel devoted to the blue component in the accumulation buffer. Deprecated.
- accum_green_size: int | None = None
Bits per pixel devoted to the green component in the accumulation buffer. Deprecated.
- accum_red_size: int | None = None
Bits per pixel devoted to the red component in the accumulation buffer. Deprecated.
- api: GraphicsAPI = 'opengl'
Which rendering API is being used (GL, ES, etc.).
- class WebGLUserConfig
A WebGL Graphics configuration.
- __init__(
- alpha: bool = False,
- depth: bool | None = None,
- stencil: bool | None = None,
- antialias: bool | None = None,
- premultipliedAlpha: bool | None = None,
- preserveDrawingBuffer: bool | None = None,
- failIfMajorPerformanceCaveat: bool | None = None,
- powerPreference: str | None = None,
- desynchronized: bool | None = None,
- property api
- desynchronized: bool | None = None
Hints to reduce latency by desynchronizing canvas painting (default False).
- failIfMajorPerformanceCaveat: bool | None = None
Whether context creation fails if performance is low (default False).
- powerPreference: str | None = None
“default”, “low-power”, or “high-performance” (default “default”).
- Type:
Hints GPU preference
- premultipliedAlpha: bool | None = None
Whether color values are pre-multiplied by alpha (default True).
- get_surface_config(
- user_config: UserConfig,
- surface: Window,
- Return type: