Enum glutin::config::Config

source ·
pub enum Config {
    Egl(EglConfig),
    Glx(GlxConfig),
}
Expand description

The GL configuration used to create Surface and Context in a cross platform way.

The config could be accessed from any thread.

fn test_send<T: Send>() {}
fn test_sync<T: Sync>() {}
test_send::<glutin::config::Config>();
test_sync::<glutin::config::Config>();

Variants§

§

Egl(EglConfig)

Available on egl_backend only.

The EGL config.

§

Glx(GlxConfig)

Available on glx_backend only.

The GLX config.

Trait Implementations§

source§

impl AsRawConfig for Config

source§

fn raw_config(&self) -> RawConfig

Obtain the RawConfig of the underlying Api.
source§

impl Clone for Config

source§

fn clone(&self) -> Config

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Config

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl GetGlDisplay for Config

§

type Target = Display

The display used by the object.
source§

fn display(&self) -> Self::Target

Obtain the GL display used to create a particular GL object.
source§

impl GlConfig for Config

source§

fn color_buffer_type(&self) -> Option<ColorBufferType>

The type of the underlying color buffer. Read more
source§

fn float_pixels(&self) -> bool

Whether the config uses floating pixels.
source§

fn alpha_size(&self) -> u8

The size of the alpha.
source§

fn depth_size(&self) -> u8

The size of the depth buffer.
source§

fn stencil_size(&self) -> u8

The size of the stencil buffer.
source§

fn num_samples(&self) -> u8

The number of samples in multisample buffer. Read more
source§

fn srgb_capable(&self) -> bool

Whether the config supports creating srgb capable Surface.
source§

fn config_surface_types(&self) -> ConfigSurfaceTypes

The type of the surfaces that can be created with this config.
source§

fn supports_transparency(&self) -> Option<bool>

Whether the config supports creating transparent surfaces. Read more
source§

fn api(&self) -> Api

The crate::config::Api supported by the configuration.
source§

impl PartialEq<Config> for Config

source§

fn eq(&self, other: &Config) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl X11GlConfigExt for Config

Available on x11_platform only.
source§

fn x11_visual(&self) -> Option<X11VisualInfo>

The X11VisualInfo that must be used to inititalize the Xlib window.
source§

impl Eq for Config

source§

impl StructuralEq for Config

source§

impl StructuralPartialEq for Config

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.