pub struct TexturePixmapX11 {}
Implementations
sourceimpl TexturePixmapX11
impl TexturePixmapX11
sourcepub fn new(
context: &Context,
pixmap: u32,
automatic_updates: bool
) -> TexturePixmapX11
pub fn new(
context: &Context,
pixmap: u32,
automatic_updates: bool
) -> TexturePixmapX11
Creates a texture that contains the contents of pixmap
. If
automatic_updates
is true
then will attempt to listen for
damage events on the pixmap and automatically update the texture
when it changes.
context
A Context
pixmap
A X11 pixmap ID
automatic_updates
Whether to automatically copy the contents of the pixmap to the texture.
Returns
a new TexturePixmapX11
instance
sourcepub fn new_left(
context: &Context,
pixmap: u32,
automatic_updates: bool
) -> TexturePixmapX11
pub fn new_left(
context: &Context,
pixmap: u32,
automatic_updates: bool
) -> TexturePixmapX11
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
TexturePixmapX11::new_right
and passing in this texture as an
argument.
In general, you should not use this fn 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.)
context
A Context
pixmap
A X11 pixmap ID
automatic_updates
Whether to automatically copy the contents of the pixmap to the texture.
Returns
a new TexturePixmapX11
instance
sourcepub fn is_using_tfp_extension(&self) -> bool
pub fn is_using_tfp_extension(&self) -> bool
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.
Returns
true
if the texture is using an efficient extension
and false
otherwise
sourcepub fn new_right(&self) -> Option<TexturePixmapX11>
pub fn new_right(&self) -> Option<TexturePixmapX11>
Creates a texture object that corresponds to the right-eye image
of a pixmap with stereo content. self
must have been
created using TexturePixmapX11::new_left
.
Returns
a new TexturePixmapX11
instance
sourcepub fn set_damage_object(
&self,
damage: u32,
report_level: TexturePixmapX11ReportLevel
)
pub fn set_damage_object(
&self,
damage: u32,
report_level: TexturePixmapX11ReportLevel
)
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 to TexturePixmapX11::new
.
Note that will subtract from the damage region as it processes damage events.
damage
A X11 Damage object or 0
report_level
The report level which describes how to interpret the damage events. This should match the level that the damage object was created with.
pub fn error_quark() -> u32
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for TexturePixmapX11
impl Send for TexturePixmapX11
impl Sync for TexturePixmapX11
impl Unpin for TexturePixmapX11
impl UnwindSafe for TexturePixmapX11
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<Fr, To> IntoColor<To> for Fr where
To: FromColor<Fr>,
impl<Fr, To> IntoColor<To> for Fr where
To: FromColor<Fr>,
sourcefn into_color(self) -> To
fn into_color(self) -> To
Convert into color
impl<T> Pointable for T
impl<T> Pointable for T
impl<T> SetParameter for T
impl<T> SetParameter for T
fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
T: Parameter<Self>,
fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
T: Parameter<Self>,
Sets value
as a parameter of self
.