Cogl.TexturePixmapX11¶
- Subclasses:
None
Methods¶
- Inherited:
class |
|
class |
|
class |
|
|
|
|
Virtual Methods¶
None
Fields¶
None
Class Details¶
- class Cogl.TexturePixmapX11¶
- Bases:
- Abstract:
No
- classmethod new(context, pixmap, automatic_updates)¶
- Parameters:
context (
Cogl.Context
) – ACogl.Context
pixmap (
int
) – A X11 pixmap IDautomatic_updates (
int
) – Whether to automatically copy the contents of the pixmap to the texture.
- Raises:
- Returns:
a new
Cogl.TexturePixmapX11
instance- Return type:
Creates a texture that contains the contents of pixmap. If automatic_updates is
True
then Cogl will attempt to listen for damage events on the pixmap and automatically update the texture when it changes.New in version 1.10.
- classmethod new_left(context, pixmap, automatic_updates)¶
- Parameters:
context (
Cogl.Context
) – ACogl.Context
pixmap (
int
) – A X11 pixmap IDautomatic_updates (
int
) – Whether to automatically copy the contents of the pixmap to the texture.
- Raises:
- Returns:
a new
Cogl.TexturePixmapX11
instance- Return type:
Creates one of a pair of textures to contain the contents of pixmap, which has stereo content. (Different images for the right and left eyes.) The left image is drawn using this texture; the right image is drawn using a texture created by calling cogl_texture_pixmap_x11_new_right() and passing in this texture as an argument.
In general, you should not use this function unless you have queried the %GLX_STEREO_TREE_EXT attribute of the corresponding window using glXQueryDrawable() and determined that the window is stereo. Note that this attribute can change over time and notification is also provided through events defined in the EXT_stereo_tree GLX extension. As long as the system has support for stereo content, drawing using the left and right pixmaps will not produce an error even if the window doesn’t have stereo content any more, but drawing with the right pixmap will produce undefined output, so you need to listen for these events and re-render to avoid race conditions. (Recreating a non-stereo pixmap is not necessary, but may save resources.)
New in version 1.20.
- is_using_tfp_extension()¶
-
Checks whether the given self is using the GLX_EXT_texture_from_pixmap or similar extension to copy the contents of the pixmap to the texture. This extension is usually implemented as zero-copy operation so it implies the updates are working efficiently.
New in version 1.4.
- set_damage_object(damage, report_level)¶
- Parameters:
damage (
int
) – A X11 Damage object or 0report_level (
Cogl.TexturePixmapX11ReportLevel
) – The report level which describes how to interpret the damage events. This should match the level that the damage object was created with.
Sets the damage object that will be used to track automatic updates to the self. Damage tracking can be disabled by passing 0 for damage. Otherwise this damage will replace the one used if
True
was passed for automatic_updates toCogl.TexturePixmapX11.new
().Note that Cogl will subtract from the damage region as it processes damage events.
New in version 1.4.
- update_area(x, y, width, height)¶
- Parameters:
Forces an update of the given self so that it is refreshed with the contents of the pixmap that was given to
Cogl.TexturePixmapX11.new
().New in version 1.4.