pub struct MemoryObject { /* private fields */ }Expand description
Describes a memory object created by an external API. In OpenGL there is no distinction between a texture or buffer and its underlying memory. However, in other API’s like Vulkan the underlying memory and the image are separate. Thus this type is useful when interfacing with such APIs, as such a memory object can then be used to create a texture or buffer which OpenGL can then interact with.
Implementations§
Source§impl MemoryObject
impl MemoryObject
Sourcepub unsafe fn new_from_fd<F: Facade + ?Sized>(
facade: &F,
dedicated: bool,
fd: File,
size: u64,
) -> Result<Self, MemoryObjectCreationError>
pub unsafe fn new_from_fd<F: Facade + ?Sized>( facade: &F, dedicated: bool, fd: File, size: u64, ) -> Result<Self, MemoryObjectCreationError>
Creates a memory object form an opaque file descriptor.
Trait Implementations§
Source§impl Drop for MemoryObject
impl Drop for MemoryObject
Auto Trait Implementations§
impl Freeze for MemoryObject
impl !RefUnwindSafe for MemoryObject
impl !Send for MemoryObject
impl !Sync for MemoryObject
impl Unpin for MemoryObject
impl !UnwindSafe for MemoryObject
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more