pub struct WebGLRSProgram<'ctx> { /* private fields */ }
Expand description

The WebGLRSProgram is part of the WebGL API and is a combination of two compiled WebGLShaders consisting of a vertex shader and a fragment shader (both written in GLSL). These are then linked into a usable program.

Implementations§

Deletes this WebGLRSProgram object. This method has no effect if the program has already been deleted.

Detaches a previously attached WebGLRSShader from this WebGLRSProgram.

Arguments
  • shader - shader to detach

Attaches a WebGLRSShader to this WebGLRSProgram.

Arguments
  • shader - shader to attach

Binds a generic vertex index to an attribute variable for this WebGLRSProgram

Arguments
  • index - specifying the index of the generic vertex to bind.
  • name - specifying the name of the variable to bind to the generic vertex index. This name cannot start with “webgl_” or “webgl”, as these are reserved for use by WebGL.

Returns the information log for this WebGLRSProgram object. It contains errors that occurred during failed linking or validation of this object.

Returns true if this WebGLRSProgram is valid, false otherwise.

Links this WebGLRSProgram to the attached vertex and fragment shaders.

Sets this WebGLRSProgram as part of the current rendering state.

Validates this WebGLRSProgram. Checks if it is successfully linked and if it can be used in the current WebGL state.

Returns a WebGLActiveInfo object containing size, type, and name of a vertex attribute.

It is generally used when querying unknown uniforms either for debugging or generic library creation.

Arguments
  • index - specifying the index of the vertex attribute to get.

Returns a WebGLActiveInfo object containing size, type, and name of a uniform attribute.

It is generally used when querying unknown uniforms either for debugging or generic library creation.

Arguments
  • index - specifying the index of the vertex attribute to get.

Returns the location of an attribute variable in this WebGLRSProgram.

Arguments
  • name - specifying the name of the attribute variable whose location to get.

Returns the location of a specific uniform variable which is part this WebGLRSProgram.

The uniform variable is returned as a WebGLUniformLocation object, which is an opaque identifier used to specify where in the GPU’s memory that uniform variable is located.

Arguments
  • name- specifying the name of the uniform variable whose location is to be returned. The name can’t have any whitespace in it, and you can’t use this function to get the location of any uniforms starting with the reserved string “gl_”, since those are internal to the WebGL layer.

Returns the binding of color numbers to user-defined varying out variables.

Arguments
  • name - specifying the name of the user-defined varying out variable.

Returns information about varying variables from WebGLTransformFeedback buffers.

Arguments
  • index - specifying the index of the varying variable whose information to retrieve.

Retrieves the index of a uniform block in this WebGLRSProgram.

Arguments
  • uniform_block_name - specifying the name of the uniform block to whose index to retrieve.

Retrieves the name of the active uniform block at a given index in this WebGLRSProgram.

Arguments
  • uniform_block_index - specifying the index of the uniform block to whose name to retrieve.

Asigns binding points for active uniform blocks.

Arguments
  • uniform_block_index - specifying the index of the active uniform block within the program.
  • uniform_block_binding - specifying the binding point to which to bind the uniform block.

Indicates whether or not the program is flagged for deletion.

Indicates whether or not the last link operation was successful.

Indicates whether or not the last validation operation was successful.

Returns the number of attached shaders to a program.

Returns the number of active attribute variables to a program.

Returns the number of active uniform variables to a program.

Returns the buffer mode when transform feedback is active. May be SeparateAttribs or InterleavedAttribs.

Returns the number of varying variables to capture in transform feedback mode.

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.