[][src]Crate iron_oxide

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

CAMetalDrawable
CAMetalLayer
CGSize
MTLBuffer
MTLClearColor
MTLCommandBuffer
MTLCommandQueue
MTLCompileOptions
MTLComputeCommandEncoder
MTLComputePipelineState
MTLDepthStencilDescriptor
MTLDepthStencilState
MTLDevice
MTLFunction
MTLLibrary
MTLParallelRenderCommandEncoder
MTLRegion
MTLRenderCommandEncoder
MTLRenderPassColorAttachmentDescriptor
MTLRenderPassColorAttachmentDescriptorArray
MTLRenderPassDepthAttachmentDescriptor
MTLRenderPassDescriptor
MTLRenderPassStencilAttachmentDescriptor
MTLRenderPipelineColorAttachmentDescriptor
MTLRenderPipelineColorAttachmentDescriptorArray
MTLRenderPipelineDescriptor
MTLRenderPipelineState
MTLResourceOptions
MTLSamplePosition
MTLSamplerDescriptor
MTLSamplerState
MTLScissorRect
MTLSize
MTLStencilDescriptor
MTLTexture
MTLTextureDescriptor
MTLVertexDescriptor
MTLViewport
NSError
NSRange
ObjectPointer

A messageable pointer to a (presumed) Objective C object.

Enums

MTLBlendFactor
MTLBlendOperation
MTLCPUCacheMode
MTLColorWriteMask
MTLCommandBufferStatus
MTLCompareFunction
MTLCullMode
MTLDepthClipMode
MTLFunctionType
MTLIndexType
MTLLanguageVersion
MTLLoadAction
MTLMultisampleDepthResolveFilter
MTLMultisampleStencilResolveFilter
MTLPixelFormat
MTLPrimitiveTopologyClass
MTLPrimitiveType
MTLPurgeableState
MTLSamplerAddressMode
MTLSamplerBorderColor
MTLSamplerMinMagFilter
MTLStencilOperation
MTLStorageMode
MTLStoreAction
MTLStoreActionOptions
MTLTextureType
MTLTextureUsage
MTLTriangleFillMode
MTLWinding

Traits

Array
CreateCAMetalLayer
DeviceCreated
MTLCommandEncoder
MTLDrawable
MTLRenderPassAttachmentDescriptor
MTLResource
Object

Represents an Objective C object.

Functions

CGDirectDisplayCopyCurrentMetalDevice

If the provided display id is not the valid id of a monitor on this device, the program will stall.

MTLCopyAllDevices

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.

MTLCreateSystemDefaultDevice
debug

Takes an implementor of Object and logs its description and retain count.

Type Definitions

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.

NSUIntegerRange

A Rust range of NSUIntegers.