Enum glium::DrawError

source ·
pub enum DrawError {
Show 27 variants NoDepthBuffer, AttributeTypeMismatch, AttributeMissing, ViewportTooLarge, InvalidDepthRange, UniformTypeMismatch { name: String, expected: UniformType, }, UniformBufferToValue { name: String, }, UniformValueToBlock { name: String, }, UniformBlockLayoutMismatch { name: String, err: LayoutMismatchError, }, SubroutineUniformToValue { name: String, }, SubroutineUniformMissing { stage: ShaderStage, expected_count: usize, real_count: usize, }, SubroutineNotFound { stage: ShaderStage, name: String, }, UnsupportedVerticesPerPatch, TessellationNotSupported, TessellationWithoutPatches, SamplersNotSupported, InstancesCountMismatch, VerticesSourcesLengthMismatch, TransformFeedbackNotSupported, WrongQueryOperation, SmoothingNotSupported, ProvokingVertexNotSupported, RasterizerDiscardNotSupported, DepthClampNotSupported, BlendingParameterNotSupported, FixedIndexRestartingNotSupported, ClipPlaneIndexOutOfBounds,
}
Expand description

Error that can happen while drawing.

Variants§

§

NoDepthBuffer

A depth function has been requested but no depth buffer is available.

§

AttributeTypeMismatch

The type of a vertex attribute in the vertices source doesn’t match what the program requires.

§

AttributeMissing

One of the attributes required by the program is missing from the vertex format.

Note that it is perfectly valid to have an attribute in the vertex format that is not used by the program.

§

ViewportTooLarge

The viewport’s dimensions are not supported by the backend.

§

InvalidDepthRange

The depth range is outside of the (0, 1) range.

§

UniformTypeMismatch

Fields

§name: String

Name of the uniform you are trying to bind.

§expected: UniformType

The expected type.

The type of a uniform doesn’t match what the program requires.

§

UniformBufferToValue

Fields

§name: String

Name of the uniform you are trying to bind.

Tried to bind a uniform buffer to a single uniform value.

§

UniformValueToBlock

Fields

§name: String

Name of the uniform you are trying to bind.

Tried to bind a single uniform value to a uniform block.

§

UniformBlockLayoutMismatch

Fields

§name: String

Name of the block you are trying to bind.

§err: LayoutMismatchError

The error giving more details about the mismatch.

The layout of the content of the uniform buffer does not match the layout of the block.

§

SubroutineUniformToValue

Fields

§name: String

Name of the uniform you are trying to bind.

Tried to bind a subroutine uniform like a regular uniform value.

§

SubroutineUniformMissing

Fields

§stage: ShaderStage

Shader stage with missing bindings.

§expected_count: usize

The expected number of bindings.

§real_count: usize

The number of bindings defined by the user.

Not all subroutine uniforms of a shader stage were set.

§

SubroutineNotFound

Fields

§stage: ShaderStage

The stage the subroutine was searched for.

§name: String

The invalid name of the subroutine.

A non-existent subroutine was referenced.

§

UnsupportedVerticesPerPatch

The number of vertices per patch that has been requested is not supported.

§

TessellationNotSupported

Trying to use tessellation, but this is not supported by the underlying hardware.

§

TessellationWithoutPatches

Using a program which contains tessellation shaders, but without submitting patches.

§

SamplersNotSupported

Trying to use a sampler, but they are not supported by the backend.

§

InstancesCountMismatch

When you use instancing, all vertices sources must have the same size.

§

VerticesSourcesLengthMismatch

If you don’t use indices, then all vertices sources must have the same size.

§

TransformFeedbackNotSupported

You requested not to draw primitives, but this is not supported by the backend.

§

WrongQueryOperation

See the documentation of the draw_parameters module for infos.

§

SmoothingNotSupported

You requested smoothing, but this is not supported by the backend.

§

ProvokingVertexNotSupported

The requested provoking vertex is not supported by the backend.

§

RasterizerDiscardNotSupported

Discarding rasterizer output isn’t supported by the backend.

§

DepthClampNotSupported

Depth clamping isn’t supported by the backend.

§

BlendingParameterNotSupported

One of the blending parameters is not supported by the backend.

§

FixedIndexRestartingNotSupported

Restarting indices (multiple objects per draw call) is not supported by the backend.

§

ClipPlaneIndexOutOfBounds

Tried to enable a clip plane that does not exist.

Trait Implementations§

source§

impl Clone for DrawError

source§

fn clone(&self) -> DrawError

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for DrawError

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Display for DrawError

source§

fn fmt(&self, fmt: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl Error for DrawError

source§

fn source(&self) -> Option<&(dyn Error + 'static)>

The lower-level source of this error, if any. Read more
1.0.0 · source§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
source§

fn provide<'a>(&'a self, demand: &mut Demand<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type based access to context intended for error reports. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

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

source§

impl<E> Provider for Ewhere E: Error + ?Sized,

source§

fn provide<'a>(&'a self, demand: &mut Demand<'a>)

🔬This is a nightly-only experimental API. (provide_any)
Data providers should implement this method to provide all values they are able to provide by using demand. Read more
source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T> ToString for Twhere T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.