[−][src]Struct surfman::platform::windows::wgl::device::Device
Methods
impl Device
[src]
pub fn create_context_descriptor(
&self,
attributes: &ContextAttributes
) -> Result<ContextDescriptor, Error>
[src]
&self,
attributes: &ContextAttributes
) -> Result<ContextDescriptor, Error>
pub unsafe fn from_current_context() -> Result<(Device, Context), Error>
[src]
Opens the device and context corresponding to the current WGL context.
The native context is not retained, as there is no way to do this in the WGL 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]
&mut self,
descriptor: &ContextDescriptor
) -> Result<Context, Error>
pub fn destroy_context(&self, context: &mut Context) -> Result<(), Error>
[src]
pub fn context_descriptor(&self, context: &Context) -> ContextDescriptor
[src]
pub fn context_descriptor_attributes(
&self,
context_descriptor: &ContextDescriptor
) -> ContextAttributes
[src]
&self,
context_descriptor: &ContextDescriptor
) -> ContextAttributes
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 bind_surface_to_context(
&self,
context: &mut Context,
surface: Surface
) -> Result<(), Error>
[src]
&self,
context: &mut Context,
surface: Surface
) -> Result<(), Error>
pub fn unbind_surface_from_context(
&self,
context: &mut Context
) -> Result<Option<Surface>, Error>
[src]
&self,
context: &mut Context
) -> Result<Option<Surface>, Error>
pub fn context_id(&self, context: &Context) -> ContextID
[src]
pub fn context_surface_info(
&self,
context: &Context
) -> Result<Option<SurfaceInfo>, Error>
[src]
&self,
context: &Context
) -> Result<Option<SurfaceInfo>, Error>
impl Device
[src]
pub fn new(_: &Connection, _: &Adapter) -> Result<Device, Error>
[src]
pub fn connection(&self) -> Connection
[src]
pub fn adapter(&self) -> Adapter
[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]
&mut self,
context: &Context,
_: SurfaceAccess,
surface_type: &SurfaceType<NativeWidget>
) -> Result<Surface, Error>
pub fn destroy_surface(
&self,
context: &mut Context,
surface: Surface
) -> Result<(), Error>
[src]
&self,
context: &mut Context,
surface: Surface
) -> Result<(), Error>
pub fn create_surface_texture(
&self,
context: &mut Context,
surface: Surface
) -> Result<SurfaceTexture, Error>
[src]
&self,
context: &mut Context,
surface: Surface
) -> Result<SurfaceTexture, Error>
pub fn destroy_surface_texture(
&self,
context: &mut Context,
surface_texture: SurfaceTexture
) -> Result<Surface, Error>
[src]
&self,
context: &mut Context,
surface_texture: SurfaceTexture
) -> Result<Surface, Error>
pub fn lock_surface_data<'s>(
&self,
_surface: &'s mut Surface
) -> Result<SurfaceDataGuard<'s>, Error>
[src]
&self,
_surface: &'s mut Surface
) -> Result<SurfaceDataGuard<'s>, Error>
pub fn surface_gl_texture_target(&self) -> c_uint
[src]
pub fn present_surface(
&self,
_: &Context,
surface: &mut Surface
) -> Result<(), Error>
[src]
&self,
_: &Context,
surface: &mut Surface
) -> Result<(), Error>
pub fn surface_info(&self, surface: &Surface) -> SurfaceInfo
[src]
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for Device
impl !Send for Device
impl !Sync for Device
impl Unpin for Device
impl !UnwindSafe for Device
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,