[−][src]Struct gaclen::graphics::device::Device
A device responsible for hardware-accelerated computations.
It is responsible for recording, submitting and synchronizing commands and data to the GPU.
Methods
impl Device
[src]
pub fn new(
context: &Context,
window: Arc<Window>,
present_mode: PresentMode
) -> Result<Device, DeviceCreationError>
[src]
context: &Context,
window: Arc<Window>,
present_mode: PresentMode
) -> Result<Device, DeviceCreationError>
Create a new device that targets a specific window.
pub fn resize_for_window(&mut self, window: &Window) -> Result<(), ResizeError>
[src]
Update the device for the resized window.
pub fn start_frame(
self,
when: Option<Box<dyn GpuFuture>>,
final_pass: &impl GraphicalPass,
clear_value: Vec<ClearValue>
) -> Result<DrawingDevice, (Self, AcquireError)>
[src]
self,
when: Option<Box<dyn GpuFuture>>,
final_pass: &impl GraphicalPass,
clear_value: Vec<ClearValue>
) -> Result<DrawingDevice, (Self, AcquireError)>
Start drawing the frame.
Takes ownership of the Device and converts it to a DrawingDevice. This corresponds to switching to the special 'middle of frame' state, that caches intermediate commands before submitting them to the GPU. To exit the state and get back the ownership of the Device call finish_frame method.
pub fn create_buffer<T: 'static>(
&self,
data_iterator: impl ExactSizeIterator<Item = T>
) -> Result<Arc<CpuAccessibleBuffer<[T]>>, DeviceMemoryAllocError>
[src]
&self,
data_iterator: impl ExactSizeIterator<Item = T>
) -> Result<Arc<CpuAccessibleBuffer<[T]>>, DeviceMemoryAllocError>
Create a basic buffer for data for processing on the GPU.
pub fn logical_device(&self) -> Arc<LogicalDevice>
[src]
Get the underlying logical device (useful for supplying to own shaders).
Trait Implementations
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]
U: From<T>,
impl<T> From<T> for 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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
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> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,