[][src]Struct surfman::platform::unix::x11::device::Device

pub struct Device { /* fields omitted */ }

Methods

impl Device[src]

pub fn create_context_descriptor(
    &self,
    attributes: &ContextAttributes
) -> Result<ContextDescriptor, Error>
[src]

pub unsafe fn from_current_context() -> Result<(Device, Context), Error>[src]

Opens the device and context corresponding to the current GLX context.

The native context is not retained, as there is no way to do this in the GLX API. It is the caller's responsibility to keep it alive for the duration of this context. Be careful when using this method; it's essentially a last resort.

This method is designed to allow surfman to deal with contexts created outside the library; for example, by Glutin. It's legal to use this method to wrap a context rendering to any target: either a window or a pbuffer. The target is opaque to surfman; the library will not modify or try to detect the render target. This means that any of the methods that query or replace the surface—e.g. replace_context_surface—will fail if called with a context object created via this method.

pub fn create_context(
    &mut self,
    descriptor: &ContextDescriptor
) -> Result<Context, Error>
[src]

pub fn destroy_context(&self, context: &mut Context) -> Result<(), Error>[src]

pub fn context_descriptor(&self, context: &Context) -> ContextDescriptor[src]

pub fn make_context_current(&self, context: &Context) -> Result<(), Error>[src]

pub fn make_no_context_current(&self) -> Result<(), Error>[src]

pub fn get_proc_address(&self, _: &Context, symbol_name: &str) -> *const c_void[src]

pub fn context_descriptor_attributes(
    &self,
    context_descriptor: &ContextDescriptor
) -> ContextAttributes
[src]

pub fn bind_surface_to_context(
    &self,
    context: &mut Context,
    surface: Surface
) -> Result<(), Error>
[src]

pub fn unbind_surface_from_context(
    &self,
    context: &mut Context
) -> Result<Option<Surface>, Error>
[src]

pub fn context_id(&self, context: &Context) -> ContextID[src]

pub fn context_surface_info(
    &self,
    context: &Context
) -> Result<Option<SurfaceInfo>, Error>
[src]

impl Device[src]

pub fn new(connection: &Connection, _: &Adapter) -> Result<Device, Error>[src]

pub fn adapter(&self) -> Adapter[src]

pub fn connection(&self) -> Connection[src]

pub fn gl_api() -> GLApi[src]

impl Device[src]

pub fn create_surface(
    &mut self,
    context: &Context,
    _: SurfaceAccess,
    surface_type: &SurfaceType<NativeWidget>
) -> Result<Surface, Error>
[src]

pub fn create_surface_texture(
    &self,
    context: &mut Context,
    surface: Surface
) -> Result<SurfaceTexture, Error>
[src]

pub fn destroy_surface(
    &self,
    context: &mut Context,
    surface: Surface
) -> Result<(), Error>
[src]

pub fn destroy_surface_texture(
    &self,
    _: &mut Context,
    surface_texture: SurfaceTexture
) -> Result<Surface, Error>
[src]

pub fn surface_gl_texture_target(&self) -> c_uint[src]

pub fn lock_surface_data<'s>(
    &self,
    _: &'s mut Surface
) -> Result<SurfaceDataGuard<'s>, Error>
[src]

pub fn present_surface(
    &self,
    _: &Context,
    surface: &mut Surface
) -> Result<(), Error>
[src]

pub fn surface_info(&self, surface: &Surface) -> SurfaceInfo[src]

Auto Trait Implementations

impl Send for Device

impl !Sync for Device

impl Unpin for Device

impl !UnwindSafe for Device

impl !RefUnwindSafe for Device

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]