Expand description
iron-oxide
provides unsafe Metal
bindings for Rust.
The Metal documentation for most structs, traits, methods, and functions can be found by googling their names (adjusted from snake_case to camelCase).
Not all of Metal’s functionality is added. The pointer underlying a MTL(something) can
be accessed with get_ptr
, and messages can be sent to it with objc
’s msg_send!
, if
necessary functionality isn’t yet implemented. This is very unsafe.
It is the responsibility of the user to not use methods or functions which do not exist in OS versions below what they support.
See the examples directory for examples.
This crate is licensed under the MIT license.
Modules§
- import_
objc_ macros - Reexports important macros for sending messages from the
objc
crate:
Macros§
- handle
- Provides an implementation of
Drop
which implements lifetime-based releasing on the implemented type’s pointer to an Objective C object.
Structs§
- CAMetal
Drawable - CAMetal
Layer - CGSize
- MTLBuffer
- MTLClear
Color - MTLCommand
Buffer - MTLCommand
Queue - MTLCompile
Options - MTLCompute
Command Encoder - MTLCompute
Pipeline State - MTLDepth
Stencil Descriptor - MTLDepth
Stencil State - MTLDevice
- MTLFunction
- MTLLibrary
- MTLParallel
Render Command Encoder - MTLRegion
- MTLRender
Command Encoder - MTLRender
Pass Color Attachment Descriptor - MTLRender
Pass Color Attachment Descriptor Array - MTLRender
Pass Depth Attachment Descriptor - MTLRender
Pass Descriptor - MTLRender
Pass Stencil Attachment Descriptor - MTLRender
Pipeline Color Attachment Descriptor - MTLRender
Pipeline Color Attachment Descriptor Array - MTLRender
Pipeline Descriptor - MTLRender
Pipeline State - MTLResource
Options - MTLSample
Position - MTLSampler
Descriptor - MTLSampler
State - MTLScissor
Rect - MTLSize
- MTLStencil
Descriptor - MTLTexture
- MTLTexture
Descriptor - MTLVertex
Descriptor - MTLViewport
- NSError
- NSRange
- Object
Pointer - A messageable pointer to a (presumed) Objective C object.
Enums§
- MTLBlend
Factor - MTLBlend
Operation - MTLCPU
Cache Mode - MTLColor
Write Mask - MTLCommand
Buffer Status - MTLCompare
Function - MTLCull
Mode - MTLDepth
Clip Mode - MTLFunction
Type - MTLIndex
Type - MTLLanguage
Version - MTLLoad
Action - MTLMultisample
Depth Resolve Filter - MTLMultisample
Stencil Resolve Filter - MTLPixel
Format - MTLPrimitive
Topology Class - MTLPrimitive
Type - MTLPurgeable
State - MTLSampler
Address Mode - MTLSampler
Border Color - MTLSampler
MinMag Filter - MTLStencil
Operation - MTLStorage
Mode - MTLStore
Action - MTLStore
Action Options - MTLTexture
Type - MTLTexture
Usage - MTLTriangle
Fill Mode - MTLWinding
Traits§
- Array
- CreateCA
Metal Layer - Device
Created - MTLCommand
Encoder - MTLDrawable
- MTLRender
Pass Attachment Descriptor - MTLResource
- Object
- Represents an Objective C object.
Functions§
- CGDirect
Display ⚠Copy Current Metal Device - If the provided display id is not the valid id of a monitor on this device, the program will stall.
- MTLCopy
AllDevices ⚠ - Does not function exactly as the
MTLCopyAllDevices
Metal function. Will, if the device running this function is iOS, instead create the system default device and put it into a vector. - MTLCreate
System ⚠Default Device - debug⚠
- Takes an implementor of
Object
and logs its description and retain count.
Type Aliases§
- CGFloat
- Aliased exclusively so that, should the watchOS target be added to Rust, CGFloat can conform to watchOS’ 32-bit architecture.
- NSInteger
- Aliased exclusively so that, should the watchOS target be added to Rust, NSInteger can conform to watchOS’ 32-bit architecture.
- NSUInteger
- Aliased exclusively so that, should the watchOS target be added to Rust, NSUInteger can conform to watchOS’ 32-bit architecture.
- NSUInteger
Range - A Rust range of NSUIntegers.