pub struct SurfaceAttributesBuilder<T: SurfaceTypeTrait + Default> { /* private fields */ }
Expand description
Builder to get the required set of attributes initialized before hand.
Implementations§
Source§impl<T: SurfaceTypeTrait + Default> SurfaceAttributesBuilder<T>
impl<T: SurfaceTypeTrait + Default> SurfaceAttributesBuilder<T>
Source§impl SurfaceAttributesBuilder<WindowSurface>
impl SurfaceAttributesBuilder<WindowSurface>
Sourcepub fn with_single_buffer(self, single_buffer: bool) -> Self
pub fn with_single_buffer(self, single_buffer: bool) -> Self
Specify whether the single buffer should be used instead of double
buffering. This doesn’t guarantee that the resulted buffer will have
only single buffer, to know that the single buffer is actually used
query the created surface with Surface::is_single_buffered
.
The surface is requested as double buffered by default.
§Api-specific.
This is EGL specific, other platforms use the context for that.
Sourcepub fn build(
self,
raw_window_handle: RawWindowHandle,
width: NonZeroU32,
height: NonZeroU32,
) -> SurfaceAttributes<WindowSurface>
pub fn build( self, raw_window_handle: RawWindowHandle, width: NonZeroU32, height: NonZeroU32, ) -> SurfaceAttributes<WindowSurface>
Build the surface attributes suitable to create a window surface.
Source§impl SurfaceAttributesBuilder<PbufferSurface>
impl SurfaceAttributesBuilder<PbufferSurface>
Sourcepub fn with_largest_pbuffer(self, largest_pbuffer: bool) -> Self
pub fn with_largest_pbuffer(self, largest_pbuffer: bool) -> Self
Request the largest pbuffer.
Sourcepub fn with_single_buffer(self, single_buffer: bool) -> Self
pub fn with_single_buffer(self, single_buffer: bool) -> Self
The same as in
SurfaceAttributesBuilder::<WindowSurface>::with_single_buffer
.
Sourcepub fn build(
self,
width: NonZeroU32,
height: NonZeroU32,
) -> SurfaceAttributes<PbufferSurface>
pub fn build( self, width: NonZeroU32, height: NonZeroU32, ) -> SurfaceAttributes<PbufferSurface>
Build the surface attributes suitable to create a pbuffer surface.
Source§impl SurfaceAttributesBuilder<PixmapSurface>
impl SurfaceAttributesBuilder<PixmapSurface>
Sourcepub fn build(
self,
native_pixmap: NativePixmap,
) -> SurfaceAttributes<PixmapSurface>
pub fn build( self, native_pixmap: NativePixmap, ) -> SurfaceAttributes<PixmapSurface>
Build the surface attributes suitable to create a pixmap surface.
Trait Implementations§
Source§impl<T: Clone + SurfaceTypeTrait + Default> Clone for SurfaceAttributesBuilder<T>
impl<T: Clone + SurfaceTypeTrait + Default> Clone for SurfaceAttributesBuilder<T>
Source§fn clone(&self) -> SurfaceAttributesBuilder<T>
fn clone(&self) -> SurfaceAttributesBuilder<T>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more