pub enum DrawError {
Show 29 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,
ClipControlNotSupported,
ClipPlaneIndexOutOfBounds,
InsufficientImageUnits,
}
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
The type of a uniform doesn’t match what the program requires.
Fields
expected: UniformType
The expected type.
UniformBufferToValue
Tried to bind a uniform buffer to a single uniform value.
UniformValueToBlock
Tried to bind a single uniform value to a uniform block.
UniformBlockLayoutMismatch
The layout of the content of the uniform buffer does not match the layout of the block.
Fields
err: LayoutMismatchError
The error giving more details about the mismatch.
SubroutineUniformToValue
Tried to bind a subroutine uniform like a regular uniform value.
SubroutineUniformMissing
Not all subroutine uniforms of a shader stage were set.
Fields
stage: ShaderStage
Shader stage with missing bindings.
SubroutineNotFound
A non-existent subroutine was referenced.
Fields
stage: ShaderStage
The stage the subroutine was searched for.
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.
ClipControlNotSupported
Changing the clip volume definition (origin and depth mode) is not supported by the backend.
ClipPlaneIndexOutOfBounds
Tried to enable a clip plane that does not exist.
InsufficientImageUnits
Tried to use too many image units simultaneously
Trait Implementations§
source§impl Error for DrawError
impl Error for DrawError
source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · source§fn description(&self) -> &str
fn description(&self) -> &str
Auto Trait Implementations§
impl Freeze for DrawError
impl RefUnwindSafe for DrawError
impl Send for DrawError
impl Sync for DrawError
impl Unpin for DrawError
impl UnwindSafe for DrawError
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.