Skip to main content

Crate mev

Crate mev 

Source
Expand description

Tiny graphics crate made for nothing but fun.

Macros§

include_library
Convenience macro to include shader library input from a source code file during compilation.
include_shader_source
Convenience macro to include shader source code from a file during compilation.
match_backend
with_metal
Macro that passes-through any tokens inside if chosen backend is Metal. Otherwise, it unwraps to nothing.
with_vulkan
Macro that passes-through any tokens inside if chosen backend is Vulkan. Otherwise, it unwraps to nothing.
with_webgpu
Macro that passes-through any tokens inside if chosen backend is WebGPU. Otherwise, it unwraps to nothing.

Structs§

AccelerationStructureBuildFlags
These flags are used to specify the build properties of an acceleration structure.
AccelerationStructureCommandEncoder
ArgumentGroupLayout
Layout of the argument group.
ArgumentLayout
Layout of the shader argument slot.
AttachmentDesc
Description of an attachment in a render pass.
Blas
Bottom-level acceleration structure. Contains ray-tracing acceleration structure for geometry. Created for triangle-meshes or procedural geometry.
BlasAABBs
Description of a bottom-level acceleration structure axis-aligned bounding box-based geometry.
BlasBuildDesc
Description of a bottom-level acceleration structure build.
BlasDesc
Description of a bottom-level acceleration structure Contains flags and size of the acceleration structure.
BlasFlags
BlasTriangles
Description of a bottom-level acceleration structure triangle-based geometry.
Blend
Describes blending option.
BlendDesc
Describes blending options for color render target.
Buffer
BufferDesc
Description used for buffer creation.
BufferInitDesc
Description used for buffer creation with initial contents.
BufferMappedRange
BufferMappedRangeMut
BufferSlice
Slice of a buffer is a reference to a buffer with offset and size. Mostly found in function arguments.
BufferUsage
Buffer usage flags.
Capabilities
Capabilities of the devices.
ClearColor
Clear value for color attachment.
ClearDepthStencil
Clear value for depth-stencil attachment.
ColorTargetDesc
Describes color render target.
CommandBuffer
CommandEncoder
ComputeCommandEncoder
ComputePipeline
ComputePipelineDesc
Compute pipeline descriptor. Used to create new compute pipelines.
CopyCommandEncoder
DataType
Device data types.
DepthStencilDesc
Describes depth-stencil render target.
Device
DeviceCapabilities
Capabilities of the specific device.
DeviceDesc
Specifies how the device should be created.
Extent
FamilyCapabilities
Capabilities of a queue family of specific device.
Features
Set of features that can be requested from the device. The device creation will fail if the device does not support all of the requested features. Check the capabilities of the device to see which features are supported.
Frame
Image
ImageDesc
Description used for image creation.
ImageUsage
Image usage flags.
Instance
Library
LibraryDesc
Describes shader library.
Offset
OutOfMemory
Error that can happen when device’s memory is exhausted.
PipelineStages
Pipeline stages flags.
Queue
QueueFlags
Flags that describe the capabilities of a queue.
RasterDesc
Describes rasterization options.
RenderCommandEncoder
RenderPassDesc
Description of a render pass.
RenderPipeline
RenderPipelineDesc
Describes render pipeline.
Sampler
SamplerDesc
Describes how to sample the texture.
Shader
Shader from the library.
ShaderSource
Describes shader source.
ShaderStages
Flags that describe the shader stages.
Surface
Swizzle
Image swizzle for each component.
Tlas
Top-level acceleration structure. Contains ray-tracing acceleration structure for instances. Created for instances of bottom-level acceleration structures.
TlasBuildDesc
TlasDesc
TlasFlags
TlasInstanceDesc
VertexAttributeDesc
Describes single vertex attribute.
VertexLayoutDesc
Describes vertex buffer layout.
ViewDesc
Description used for image view creation.
WriteMask
Mask for color blend write.
mat
Matrix data type. Element type should be Scalar, then it can be used as device data type.
vec
Vector data type. Element type should be Scalar, then it can be used as device data type.

Enums§

AccelerationStructurePerformance
Performance hints for acceleration structure operation.
AddressMode
Address mode to use when sampling the texture.
ArgumentKind
Kind of the shader argument.
Automatic
Marker type for Argument trait.
Backend
Backend that is used for rendering.
BlasGeometryDesc
Description of a bottom-level acceleration structure geometry.
BlendFactor
Blending factor.
BlendOp
Blending operation.
CompareFunction
Comparison function for depth test.
ComponentSwizzle
Image component swizzle.
Culling
Face culling mode.
DeviceError
Filter
Filter to use when sampling the texture.
FrontFace
Front face winding order.
ImageExtent
Extent of the image.
LibraryInput
Input for the library. Currently only source code is supported.
LoadOp
Load operation for an attachment.
MipMapMode
Mip-map mode to use when sampling the texture.
PipelineError
Error during render pipeline creation.
PipelineStage
Stages in the rendering pipeline.
PixelFormat
Format of the pixel.
PrimitiveTopology
Describes primitive topology.
Sampled
Marker type for Argument trait.
ScalarType
Types that can be passed as arguments to shaders. Each element of the enum corresponds to a type that implements DataType.
ShaderLanguage
Shader language.
ShaderLibraryError
ShaderStage
Shader stage.
Storage
Marker type for Argument trait.
StoreOp
Store operation for an attachment.
SurfaceError
Error that can occur when working with a surface.
Uniform
Marker type for Argument trait.
VectorSize
Supported sizes of vectors.
VertexFormat
Format of the vertex attribute.
VertexStepMode
Step mode for vertex buffer.

Traits§

Arguments
Shader arguments trait. Implemented by types that serve as shader arguments.
ArgumentsField
Trait implemented by types that can be fields in type that derive Arguments. This cannot be implemented outside of the crate.
AsBufferSlice
Trait to generalize over types that can be converted to buffer slice. This is a buffer slice itself, a buffer and references.
AutoDeviceRepr
A type that implements DeviceRepr and is compatible with GPU layout without padding.
BufferRange
Trait for types that can be used to index a buffer to get a slice of it. It is implemented for different range types over usize.
DeviceRepr
Type representable as a POD type with GPU compatible layout.
One
Scalar
Scalar types compatible with shaders primitives.
VertexAttributes
Values that can be passed as attributes to shaders. This trait is sealed and cannot be implemented in other crates.
VertexBinding
Trait to be derived for structures that contain vertex attributes.
VertexScalar
Narrow traits for scalar types that can be used as vertex attributes.
Zero

Functions§

mat2
Construct a mat2.
mat3
Construct a mat3.
mat4
Construct a mat4.
mat2x2
Construct a mat2x2.
mat2x3
Construct a mat2x3.
mat2x4
Construct a mat2x4.
mat3x2
Construct a mat3x2.
mat3x3
Construct a mat3x3.
mat3x4
Construct a mat3x4.
mat4x2
Construct a mat4x2.
mat4x3
Construct a mat4x3.
mat4x4
Construct a mat4x4.
vec2
Construct a vec2.
vec3
Construct a vec3.
vec4
Construct a vec4.

Type Aliases§

Extent1
Extent2
Extent3
Offset1
Offset2
Offset3
bmat2
Square boolean matrix type of two columns and two rows.
bmat3
Square boolean matrix type of three columns and three rows.
bmat4
Square boolean matrix type of four columns and four rows.
bmat2x2
Square boolean matrix type of two columns and two rows.
bmat2x3
Boolean matrix type of two columns and three rows.
bmat2x4
Boolean matrix type of two columns and four rows.
bmat3x2
Boolean matrix type of three columns and two rows.
bmat3x3
Square boolean matrix type of three columns and three rows.
bmat3x4
Boolean matrix type of three columns and four rows.
bmat4x2
Boolean matrix type of four columns and two rows.
bmat4x3
Boolean matrix type of four columns and three rows.
bmat4x4
Square boolean matrix type of four columns and four rows.
bvec2
Boolean vector type of two elements.
bvec3
Boolean vector type of three elements.
bvec4
Boolean vector type of four elements.
dmat2
Square double precision floating point matrix type of two columns and two rows.
dmat3
Square double precision floating point matrix type of three columns and three rows.
dmat4
Square double precision floating point matrix type of four columns and four rows.
dmat2x2
Square double precision floating point matrix type of two columns and two rows.
dmat2x3
Double precision floating point matrix type of two columns and three rows.
dmat2x4
Double precision floating point matrix type of two columns and four rows.
dmat3x2
Double precision floating point matrix type of three columns and two rows.
dmat3x3
Square double precision floating point matrix type of three columns and three rows.
dmat3x4
Double precision floating point matrix type of three columns and four rows.
dmat4x2
Double precision floating point matrix type of four columns and two rows.
dmat4x3
Double precision floating point matrix type of four columns and three rows.
dmat4x4
Square double precision floating point matrix type of four columns and four rows.
dvec2
Double precision floating point vector type of two elements.
dvec3
Double precision floating point vector type of three elements.
dvec4
Double precision floating point vector type of four elements.
imat2
Square signed integer matrix type of two columns and two rows.
imat3
Square signed integer matrix type of three columns and three rows.
imat4
Square signed integer matrix type of four columns and four rows.
imat2x2
Square signed integer matrix type of two columns and two rows.
imat2x3
Signed integer matrix type of two columns and three rows.
imat2x4
Signed integer matrix type of two columns and four rows.
imat3x2
Signed integer matrix type of three columns and two rows.
imat3x3
Square signed integer matrix type of three columns and three rows.
imat3x4
Signed integer matrix type of three columns and four rows.
imat4x2
Signed integer matrix type of four columns and two rows.
imat4x3
Signed integer matrix type of four columns and three rows.
imat4x4
Square signed integer matrix type of four columns and four rows.
ivec2
Signed integer vector type of two elements.
ivec3
Signed integer vector type of three elements.
ivec4
Signed integer vector type of four elements.
mat2
Square matrix type of two columns and two rows.
mat3
Square matrix type of three columns and three rows.
mat4
Square matrix type of four columns and four rows.
mat2x2
Square matrix type of two columns and two rows.
mat2x3
Matrix type of two columns and three rows.
mat2x4
Matrix type of two columns and four rows.
mat3x2
Matrix type of three columns and two rows.
mat3x3
Square matrix type of three columns and three rows.
mat3x4
Matrix type of three columns and four rows.
mat4x2
Matrix type of four columns and two rows.
mat4x3
Matrix type of four columns and three rows.
mat4x4
Square matrix type of four columns and four rows.
umat2
Square unsigned integer matrix type of two columns and two rows.
umat3
Square unsigned integer matrix type of three columns and three rows.
umat4
Square unsigned integer matrix type of four columns and four rows.
umat2x2
Square unsigned integer matrix type of two columns and two rows.
umat2x3
Unsigned integer matrix type of two columns and three rows.
umat2x4
Unsigned integer matrix type of two columns and four rows.
umat3x2
Unsigned integer matrix type of three columns and two rows.
umat3x3
Square unsigned integer matrix type of three columns and three rows.
umat3x4
Unsigned integer matrix type of three columns and four rows.
umat4x2
Unsigned integer matrix type of four columns and two rows.
umat4x3
Unsigned integer matrix type of four columns and three rows.
umat4x4
Square unsigned integer matrix type of four columns and four rows.
uvec2
Unsigned integer vector type of two elements.
uvec3
Unsigned integer vector type of three elements.
uvec4
Unsigned integer vector type of four elements.
vec2
Vector type of two elements.
vec3
Vector type of three elements.
vec4
Vector type of four elements.

Derive Macros§

Arguments
AutoDeviceRepr
DeviceRepr
VertexBinding