[−][src]Struct surfman::platform::windows::wgl::connection::Connection
Represents a connection to the display server.
Window server connections are implicit in the Win32 API, so this is a zero-sized type.
Implementations
impl Connection
[src]
pub fn new() -> Result<Connection, Error>
[src]
Connects to the default display.
pub unsafe fn from_native_connection(
_: NativeConnection
) -> Result<Connection, Error>
[src]
_: NativeConnection
) -> Result<Connection, Error>
An alias for Connection::new()
, present for consistency with other backends.
pub fn native_connection(&self) -> NativeConnection
[src]
Returns the underlying native connection.
pub fn gl_api(&self) -> GLApi
[src]
Returns the OpenGL API flavor that this connection supports (OpenGL or OpenGL ES).
pub fn create_adapter(&self) -> Result<Adapter, Error>
[src]
Returns the "best" adapter on this system, preferring high-performance hardware adapters.
This is an alias for Connection::create_hardware_adapter()
.
pub fn create_hardware_adapter(&self) -> Result<Adapter, Error>
[src]
Returns the "best" adapter on this system, preferring high-performance hardware adapters.
pub fn create_low_power_adapter(&self) -> Result<Adapter, Error>
[src]
Returns the "best" adapter on this system, preferring low-power hardware adapters.
pub fn create_software_adapter(&self) -> Result<Adapter, Error>
[src]
Returns the "best" adapter on this system, preferring software adapters.
pub fn create_device(&self, adapter: &Adapter) -> Result<Device, Error>
[src]
Opens a device.
pub unsafe fn create_device_from_native_device(
&self,
native_device: NativeDevice
) -> Result<Device, Error>
[src]
&self,
native_device: NativeDevice
) -> Result<Device, Error>
Creates a Device
from a Direct3D 11 device and associated GL/DX interop handle.
The handle can be created by calling wglDXOpenDeviceNV
from the WGL_NV_DX_interop
extension.
This method increases the reference count on the Direct3D 11 device and takes ownership of the GL/DX interop handle.
pub fn from_winit_window(_: &Window) -> Result<Connection, Error>
[src]
Opens the display connection corresponding to the given winit
window.
pub fn create_native_widget_from_winit_window(
&self,
window: &Window
) -> Result<NativeWidget, Error>
[src]
&self,
window: &Window
) -> Result<NativeWidget, Error>
Creates a native widget type from the given winit
window.
This type can be later used to create surfaces that render to the window.
pub unsafe fn create_native_widget_from_ptr(
&self,
raw: *mut c_void,
_size: Size2D<i32>
) -> NativeWidget
[src]
&self,
raw: *mut c_void,
_size: Size2D<i32>
) -> NativeWidget
Create a native widget from a raw pointer
Trait Implementations
impl Clone for Connection
[src]
fn clone(&self) -> Connection
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Connection for Connection
[src]
type Adapter = Adapter
The adapter type associated with this connection.
type Device = Device
The device type associated with this connection.
type NativeConnection = NativeConnection
The native type associated with this connection.
type NativeDevice = NativeDevice
The native device type associated with this connection.
type NativeWidget = NativeWidget
The native widget type associated with this connection.
fn new() -> Result<Connection, Error>
[src]
fn native_connection(&self) -> Self::NativeConnection
[src]
fn gl_api(&self) -> GLApi
[src]
fn create_adapter(&self) -> Result<Adapter, Error>
[src]
fn create_hardware_adapter(&self) -> Result<Adapter, Error>
[src]
fn create_low_power_adapter(&self) -> Result<Adapter, Error>
[src]
fn create_software_adapter(&self) -> Result<Adapter, Error>
[src]
fn create_device(&self, adapter: &Adapter) -> Result<Device, Error>
[src]
unsafe fn create_device_from_native_device(
&self,
native_device: Self::NativeDevice
) -> Result<Device, Error>
[src]
&self,
native_device: Self::NativeDevice
) -> Result<Device, Error>
fn from_winit_window(window: &Window) -> Result<Connection, Error>
[src]
fn create_native_widget_from_winit_window(
&self,
window: &Window
) -> Result<NativeWidget, Error>
[src]
&self,
window: &Window
) -> Result<NativeWidget, Error>
unsafe fn create_native_widget_from_ptr(
&self,
raw: *mut c_void,
size: Size2D<i32>
) -> NativeWidget
[src]
&self,
raw: *mut c_void,
size: Size2D<i32>
) -> NativeWidget
Auto Trait Implementations
impl RefUnwindSafe for Connection
impl Send for Connection
impl Sync for Connection
impl Unpin for Connection
impl UnwindSafe for Connection
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> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
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>,