Struct script::dom::webglprogram::WebGLProgram
source · #[repr(C)]pub struct WebGLProgram {Show 14 fields
webgl_object: WebGLObject,
id: WebGLProgramId,
is_in_use: Cell<bool>,
marked_for_deletion: Cell<bool>,
link_called: Cell<bool>,
linked: Cell<bool>,
link_generation: Cell<u64>,
fragment_shader: MutNullableDom<WebGLShader>,
vertex_shader: MutNullableDom<WebGLShader>,
active_attribs: DomRefCell<Box<[ActiveAttribInfo]>>,
active_uniforms: DomRefCell<Box<[ActiveUniformInfo]>>,
active_uniform_blocks: DomRefCell<Box<[ActiveUniformBlockInfo]>>,
transform_feedback_varyings_length: Cell<i32>,
transform_feedback_mode: Cell<i32>,
}
Fields§
§webgl_object: WebGLObject
§id: WebGLProgramId
§is_in_use: Cell<bool>
§marked_for_deletion: Cell<bool>
§link_called: Cell<bool>
§linked: Cell<bool>
§link_generation: Cell<u64>
§fragment_shader: MutNullableDom<WebGLShader>
§vertex_shader: MutNullableDom<WebGLShader>
§active_attribs: DomRefCell<Box<[ActiveAttribInfo]>>
§active_uniforms: DomRefCell<Box<[ActiveUniformInfo]>>
§active_uniform_blocks: DomRefCell<Box<[ActiveUniformBlockInfo]>>
§transform_feedback_varyings_length: Cell<i32>
§transform_feedback_mode: Cell<i32>
Implementations§
source§impl WebGLProgram
impl WebGLProgram
fn __assert_parent_type(&self)
source§impl WebGLProgram
impl WebGLProgram
fn new_inherited(context: &WebGLRenderingContext, id: WebGLProgramId) -> Self
pub fn maybe_new(context: &WebGLRenderingContext) -> Option<Root<Dom<Self>>>
pub fn new( context: &WebGLRenderingContext, id: WebGLProgramId ) -> Root<Dom<Self>>
source§impl WebGLProgram
impl WebGLProgram
pub fn id(&self) -> WebGLProgramId
sourcepub fn mark_for_deletion(&self, operation_fallibility: Operation)
pub fn mark_for_deletion(&self, operation_fallibility: Operation)
glDeleteProgram
pub fn in_use(&self, value: bool)
fn detach_shaders(&self)
pub fn is_in_use(&self) -> bool
pub fn is_marked_for_deletion(&self) -> bool
pub fn is_deleted(&self) -> bool
pub fn is_linked(&self) -> bool
sourcepub fn link(&self) -> WebGLResult<()>
pub fn link(&self) -> WebGLResult<()>
glLinkProgram
pub fn active_attribs(&self) -> Ref<'_, [ActiveAttribInfo]>
pub fn active_uniforms(&self) -> Ref<'_, [ActiveUniformInfo]>
pub fn active_uniform_blocks(&self) -> Ref<'_, [ActiveUniformBlockInfo]>
sourcepub fn validate(&self) -> WebGLResult<()>
pub fn validate(&self) -> WebGLResult<()>
glValidateProgram
sourcepub fn attach_shader(&self, shader: &WebGLShader) -> WebGLResult<()>
pub fn attach_shader(&self, shader: &WebGLShader) -> WebGLResult<()>
glAttachShader
sourcepub fn detach_shader(&self, shader: &WebGLShader) -> WebGLResult<()>
pub fn detach_shader(&self, shader: &WebGLShader) -> WebGLResult<()>
glDetachShader
sourcepub fn bind_attrib_location(
&self,
index: u32,
name: DOMString
) -> WebGLResult<()>
pub fn bind_attrib_location( &self, index: u32, name: DOMString ) -> WebGLResult<()>
glBindAttribLocation
pub fn get_active_uniform( &self, index: u32 ) -> WebGLResult<Root<Dom<WebGLActiveInfo>>>
sourcepub fn get_active_attrib(
&self,
index: u32
) -> WebGLResult<Root<Dom<WebGLActiveInfo>>>
pub fn get_active_attrib( &self, index: u32 ) -> WebGLResult<Root<Dom<WebGLActiveInfo>>>
glGetActiveAttrib
sourcepub fn get_attrib_location(&self, name: DOMString) -> WebGLResult<i32>
pub fn get_attrib_location(&self, name: DOMString) -> WebGLResult<i32>
glGetAttribLocation
sourcepub fn get_frag_data_location(&self, name: DOMString) -> WebGLResult<i32>
pub fn get_frag_data_location(&self, name: DOMString) -> WebGLResult<i32>
glGetFragDataLocation
sourcepub fn get_uniform_location(
&self,
name: DOMString
) -> WebGLResult<Option<Root<Dom<WebGLUniformLocation>>>>
pub fn get_uniform_location( &self, name: DOMString ) -> WebGLResult<Option<Root<Dom<WebGLUniformLocation>>>>
glGetUniformLocation
pub fn get_uniform_block_index(&self, name: DOMString) -> WebGLResult<u32>
pub fn get_uniform_indices( &self, names: Vec<DOMString> ) -> WebGLResult<Vec<u32>>
pub fn get_active_uniforms( &self, indices: Vec<u32>, pname: u32 ) -> WebGLResult<Vec<i32>>
pub fn get_active_uniform_block_parameter( &self, block_index: u32, pname: u32 ) -> WebGLResult<Vec<i32>>
pub fn get_active_uniform_block_name( &self, block_index: u32 ) -> WebGLResult<String>
pub fn bind_uniform_block( &self, block_index: u32, block_binding: u32 ) -> WebGLResult<()>
sourcepub fn get_info_log(&self) -> WebGLResult<String>
pub fn get_info_log(&self) -> WebGLResult<String>
glGetProgramInfoLog
pub fn attached_shaders(&self) -> WebGLResult<Vec<Root<Dom<WebGLShader>>>>
pub fn link_generation(&self) -> u64
pub fn transform_feedback_varyings_length(&self) -> i32
pub fn transform_feedback_buffer_mode(&self) -> i32
Trait Implementations§
source§impl Castable for WebGLProgram
impl Castable for WebGLProgram
source§impl DomObject for WebGLProgram
impl DomObject for WebGLProgram
source§impl DomObjectWrap for WebGLProgram
impl DomObjectWrap for WebGLProgram
source§const WRAP: unsafe fn(_: SafeJSContext, _: &GlobalScope, _: Option<HandleObject<'_>>, _: Box<Self>) -> Root<Dom<Self>> = {dom::bindings::codegen::Bindings::WebGLProgramBinding::WebGLProgram_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::webglprogram::WebGLProgram>) -> dom::bindings::root::Root<dom::bindings::root::Dom<dom::webglprogram::WebGLProgram>>}
const WRAP: unsafe fn(_: SafeJSContext, _: &GlobalScope, _: Option<HandleObject<'_>>, _: Box<Self>) -> Root<Dom<Self>> = {dom::bindings::codegen::Bindings::WebGLProgramBinding::WebGLProgram_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::webglprogram::WebGLProgram>) -> dom::bindings::root::Root<dom::bindings::root::Dom<dom::webglprogram::WebGLProgram>>}
Function pointer to the general wrap function type
source§impl Drop for WebGLProgram
impl Drop for WebGLProgram
source§impl HasParent for WebGLProgram
impl HasParent for WebGLProgram
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 WebGLProgram
impl IDLInterface for WebGLProgram
source§impl MallocSizeOf for WebGLProgram
impl MallocSizeOf for WebGLProgram
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 WebGLProgram
impl MutDomObject for WebGLProgram
source§unsafe fn init_reflector(&self, obj: *mut JSObject)
unsafe fn init_reflector(&self, obj: *mut JSObject)
Initializes the Reflector
source§impl PartialEq<WebGLProgram> for WebGLProgram
impl PartialEq<WebGLProgram> for WebGLProgram
source§fn eq(&self, other: &WebGLProgram) -> bool
fn eq(&self, other: &WebGLProgram) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl ToJSValConvertible for WebGLProgram
impl ToJSValConvertible for WebGLProgram
source§impl Traceable for WebGLProgram
impl Traceable for WebGLProgram
impl DerivedFrom<WebGLObject> for WebGLProgram
Auto Trait Implementations§
impl !RefUnwindSafe for WebGLProgram
impl !Send for WebGLProgram
impl !Sync for WebGLProgram
impl Unpin for WebGLProgram
impl !UnwindSafe for WebGLProgram
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<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>where
F: FnOnce(&Self) -> bool,
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>where F: FnOnce(&Self) -> bool,
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, Global>> for T
impl<T> MaybeBoxed<Box<T, Global>> for T
source§fn maybe_boxed(self) -> Box<T, Global>
fn maybe_boxed(self) -> Box<T, Global>
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