Struct script::dom::webglframebuffer::WebGLFramebuffer
source · #[repr(C)]pub struct WebGLFramebuffer {Show 15 fields
webgl_object: WebGLObject,
webgl_version: WebGLVersion,
id: WebGLFramebufferId,
target: Cell<Option<u32>>,
is_deleted: Cell<bool>,
size: Cell<Option<(i32, i32)>>,
status: Cell<u32>,
colors: Vec<DomRefCell<Option<WebGLFramebufferAttachment>>>,
depth: DomRefCell<Option<WebGLFramebufferAttachment>>,
stencil: DomRefCell<Option<WebGLFramebufferAttachment>>,
depthstencil: DomRefCell<Option<WebGLFramebufferAttachment>>,
color_read_buffer: DomRefCell<u32>,
color_draw_buffers: DomRefCell<Vec<u32>>,
is_initialized: Cell<bool>,
xr_session: MutNullableDom<XRSession>,
}
Fields§
§webgl_object: WebGLObject
§webgl_version: WebGLVersion
§id: WebGLFramebufferId
§target: Cell<Option<u32>>
§is_deleted: Cell<bool>
§size: Cell<Option<(i32, i32)>>
§status: Cell<u32>
§colors: Vec<DomRefCell<Option<WebGLFramebufferAttachment>>>
§depth: DomRefCell<Option<WebGLFramebufferAttachment>>
§stencil: DomRefCell<Option<WebGLFramebufferAttachment>>
§depthstencil: DomRefCell<Option<WebGLFramebufferAttachment>>
§color_read_buffer: DomRefCell<u32>
§color_draw_buffers: DomRefCell<Vec<u32>>
§is_initialized: Cell<bool>
§xr_session: MutNullableDom<XRSession>
Implementations§
source§impl WebGLFramebuffer
impl WebGLFramebuffer
fn __assert_parent_type(&self)
source§impl WebGLFramebuffer
impl WebGLFramebuffer
fn new_inherited( context: &WebGLRenderingContext, id: WebGLFramebufferId, ) -> Self
pub fn maybe_new(context: &WebGLRenderingContext) -> Option<Root<Dom<Self>>>
pub fn maybe_new_webxr( session: &XRSession, context: &WebGLRenderingContext, size: Size2D<i32, Viewport>, ) -> Option<Root<Dom<Self>>>
pub fn new( context: &WebGLRenderingContext, id: WebGLFramebufferId, ) -> Root<Dom<Self>>
source§impl WebGLFramebuffer
impl WebGLFramebuffer
pub fn id(&self) -> WebGLFramebufferId
fn is_in_xr_session(&self) -> bool
pub fn validate_transparent(&self) -> WebGLResult<()>
pub fn bind(&self, target: u32)
pub fn delete(&self, operation_fallibility: Operation)
pub fn is_deleted(&self) -> bool
pub fn size(&self) -> Option<(i32, i32)>
fn check_attachment_constraints<'a>( &self, attachment: &Option<WebGLFramebufferAttachment>, constraints: impl Iterator<Item = &'a u32>, fb_size: &mut Option<(i32, i32)>, ) -> Result<(), u32>
pub fn update_status(&self)
pub fn check_status(&self) -> u32
pub fn check_status_for_rendering(&self) -> CompleteForRendering
pub fn renderbuffer( &self, attachment: u32, rb: Option<&WebGLRenderbuffer>, ) -> WebGLResult<()>
fn detach_binding( &self, binding: &DomRefCell<Option<WebGLFramebufferAttachment>>, attachment: u32, ) -> WebGLResult<()>
fn attachment_binding( &self, attachment: u32, ) -> Option<&DomRefCell<Option<WebGLFramebufferAttachment>>>
fn reattach_depth_stencil(&self) -> WebGLResult<()>
pub fn attachment( &self, attachment: u32, ) -> Option<WebGLFramebufferAttachmentRoot>
pub fn texture2d( &self, attachment: u32, textarget: u32, texture: Option<&WebGLTexture>, level: i32, ) -> WebGLResult<()>
pub fn texture2d_even_if_opaque( &self, attachment: u32, textarget: u32, texture: Option<&WebGLTexture>, level: i32, ) -> WebGLResult<()>
pub fn texture_layer( &self, attachment: u32, texture: Option<&WebGLTexture>, level: i32, layer: i32, ) -> WebGLResult<()>
fn with_matching_renderbuffers<F>(&self, rb: &WebGLRenderbuffer, closure: F)
fn with_matching_textures<F>(&self, texture: &WebGLTexture, closure: F)
pub fn detach_renderbuffer(&self, rb: &WebGLRenderbuffer) -> WebGLResult<()>
pub fn detach_texture(&self, texture: &WebGLTexture) -> WebGLResult<()>
pub fn invalidate_renderbuffer(&self, rb: &WebGLRenderbuffer)
pub fn invalidate_texture(&self, texture: &WebGLTexture)
pub fn set_read_buffer(&self, buffer: u32) -> WebGLResult<()>
pub fn set_draw_buffers(&self, buffers: Vec<u32>) -> WebGLResult<()>
pub fn read_buffer(&self) -> u32
pub fn draw_buffer_i(&self, index: usize) -> u32
pub fn target(&self) -> Option<u32>
Trait Implementations§
source§impl Castable for WebGLFramebuffer
impl Castable for WebGLFramebuffer
source§impl DomObject for WebGLFramebuffer
impl DomObject for WebGLFramebuffer
source§impl DomObjectWrap for WebGLFramebuffer
impl DomObjectWrap for WebGLFramebuffer
source§const WRAP: unsafe fn(_: SafeJSContext, _: &GlobalScope, _: Option<HandleObject<'_>>, _: Box<Self>, _: CanGc) -> Root<Dom<Self>> = {dom::bindings::codegen::Bindings::WebGLFramebufferBinding::WebGLFramebuffer_Binding::Wrap as for<'a, 'b> unsafe fn(script_runtime::JSContext, &'a dom::globalscope::GlobalScope, std::option::Option<js::rust::Handle<'b, *mut js::jsapi::JSObject>>, std::boxed::Box<dom::webglframebuffer::WebGLFramebuffer>, script_runtime::CanGc) -> dom::bindings::root::Root<dom::bindings::root::Dom<dom::webglframebuffer::WebGLFramebuffer>>}
const WRAP: unsafe fn(_: SafeJSContext, _: &GlobalScope, _: Option<HandleObject<'_>>, _: Box<Self>, _: CanGc) -> Root<Dom<Self>> = {dom::bindings::codegen::Bindings::WebGLFramebufferBinding::WebGLFramebuffer_Binding::Wrap as for<'a, 'b> unsafe fn(script_runtime::JSContext, &'a dom::globalscope::GlobalScope, std::option::Option<js::rust::Handle<'b, *mut js::jsapi::JSObject>>, std::boxed::Box<dom::webglframebuffer::WebGLFramebuffer>, script_runtime::CanGc) -> dom::bindings::root::Root<dom::bindings::root::Dom<dom::webglframebuffer::WebGLFramebuffer>>}
Function pointer to the general wrap function type
source§impl Drop for WebGLFramebuffer
impl Drop for WebGLFramebuffer
source§impl HasParent for WebGLFramebuffer
impl HasParent for WebGLFramebuffer
source§fn as_parent(&self) -> &WebGLObject
fn as_parent(&self) -> &WebGLObject
This is used in a type assertion to ensure that the source and webidls agree as to what the parent type is
type Parent = WebGLObject
source§impl IDLInterface for WebGLFramebuffer
impl IDLInterface for WebGLFramebuffer
source§impl MallocSizeOf for WebGLFramebuffer
impl MallocSizeOf for WebGLFramebuffer
source§fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
Measure the heap usage of all descendant heap-allocated structures, but
not the space taken up by the value itself.
source§impl MutDomObject for WebGLFramebuffer
impl MutDomObject for WebGLFramebuffer
source§impl PartialEq for WebGLFramebuffer
impl PartialEq for WebGLFramebuffer
source§impl Traceable for WebGLFramebuffer
impl Traceable for WebGLFramebuffer
impl DerivedFrom<WebGLObject> for WebGLFramebuffer
impl Eq for WebGLFramebuffer
Auto Trait Implementations§
impl !Freeze for WebGLFramebuffer
impl !RefUnwindSafe for WebGLFramebuffer
impl !Send for WebGLFramebuffer
impl !Sync for WebGLFramebuffer
impl Unpin for WebGLFramebuffer
impl !UnwindSafe for WebGLFramebuffer
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
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.source§impl<T> Filterable for T
impl<T> Filterable for T
source§fn filterable(
self,
filter_name: &'static str,
) -> RequestFilterDataProvider<T, fn(_: DataRequest<'_>) -> bool>
fn filterable( self, filter_name: &'static str, ) -> RequestFilterDataProvider<T, fn(_: DataRequest<'_>) -> bool>
Creates a filterable data provider with the given name for debugging. Read more
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§impl<T> MaybeBoxed<Box<T>> for T
impl<T> MaybeBoxed<Box<T>> for T
source§fn maybe_boxed(self) -> Box<T>
fn maybe_boxed(self) -> Box<T>
Convert
source§impl<T> MaybeBoxed<T> for T
impl<T> MaybeBoxed<T> for T
source§fn maybe_boxed(self) -> T
fn maybe_boxed(self) -> T
Convert