pub struct GraphicsResource { /* private fields */ }Expand description
An opaque native GL or browser WebGL image resource.
Implementations§
Source§impl GraphicsResource
impl GraphicsResource
pub const fn new( api: GraphicsApi, context: ContextIdentity, owner: ExecutionOwner, kind: ResourceKind, handle: u64, dimensions: VideoDimensions, pixel_format: PixelFormat, color_range: ColorRange, orientation: Orientation, ownership: ResourceOwnership, ) -> Self
pub const fn api(self) -> GraphicsApi
pub const fn context(self) -> ContextIdentity
pub const fn owner(self) -> ExecutionOwner
pub const fn kind(self) -> ResourceKind
pub const fn handle(self) -> u64
pub const fn dimensions(self) -> VideoDimensions
pub const fn pixel_format(self) -> PixelFormat
pub const fn color_range(self) -> ColorRange
pub const fn orientation(self) -> Orientation
pub const fn ownership(self) -> ResourceOwnership
Sourcepub fn release(self, adapter: &mut dyn GraphicsAdapter) -> Result<()>
pub fn release(self, adapter: &mut dyn GraphicsAdapter) -> Result<()>
Releases a library-owned resource. Caller-owned handles are deliberately left untouched.
Trait Implementations§
Source§impl Clone for GraphicsResource
impl Clone for GraphicsResource
impl Copy for GraphicsResource
Source§impl Debug for GraphicsResource
impl Debug for GraphicsResource
impl Eq for GraphicsResource
Source§impl Hash for GraphicsResource
impl Hash for GraphicsResource
Source§impl PartialEq for GraphicsResource
impl PartialEq for GraphicsResource
impl StructuralPartialEq for GraphicsResource
Auto Trait Implementations§
impl Freeze for GraphicsResource
impl RefUnwindSafe for GraphicsResource
impl Send for GraphicsResource
impl Sync for GraphicsResource
impl Unpin for GraphicsResource
impl UnsafeUnpin for GraphicsResource
impl UnwindSafe for GraphicsResource
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