diff --git a/src/accelerator_structure.rs b/src/accelerator_structure.rs index ed1c5ef..b08d674 100644 --- a/src/accelerator_structure.rs +++ b/src/accelerator_structure.rs @@ -118,6 +118,10 @@ impl AccelerationStructureTriangleGeometryDescriptorRef { unsafe { msg_send![self, setIndexBuffer: buffer] } } + pub fn set_index_buffer_offset(&self, offset: NSUInteger) { + unsafe { msg_send![self, setIndexBufferOffset: offset] } + } + pub fn set_index_type(&self, t: MTLIndexType) { unsafe { msg_send![self, setIndexType: t] } } @@ -126,6 +130,10 @@ impl AccelerationStructureTriangleGeometryDescriptorRef { unsafe { msg_send![self, setVertexBuffer: buffer] } } + pub fn set_vertex_buffer_offset(&self, offset: NSUInteger) { + unsafe { msg_send![self, setVertexBufferOffset: offset] } + } + pub fn set_vertex_stride(&self, stride: NSUInteger) { unsafe { msg_send![self, setVertexStride: stride] } } @@ -133,6 +141,18 @@ impl AccelerationStructureTriangleGeometryDescriptorRef { pub fn set_triangle_count(&self, count: NSUInteger) { unsafe { msg_send![self, setTriangleCount: count] } } + + pub fn set_vertex_format(&self, format: MTLVertexFormat) { + unsafe { msg_send![self, setVertexFormat: format] } + } + + pub fn set_transformation_matrix_buffer(&self, buffer: Option<&BufferRef>) { + unsafe { msg_send![self, setTransformationMatrixBuffer: buffer] } + } + + pub fn set_transformation_matrix_buffer_offset(&self, offset: NSUInteger) { + unsafe { msg_send![self, setTransformationMatrixBufferOffset: offset] } + } } pub enum MTLAccelerationStructureBoundingBoxGeometryDescriptor {} @@ -194,6 +214,10 @@ impl InstanceAccelerationStructureDescriptorRef { pub fn set_instance_descriptor_buffer(&self, buffer: &BufferRef) { unsafe { msg_send![self, setInstanceDescriptorBuffer: buffer] } } + + pub fn set_instance_descriptor_buffer_offset(&self, offset: NSUInteger) { + unsafe { msg_send![self, setInstanceDescriptorBufferOffset: offset] } + } } pub enum MTLAccelerationStructureCommandEncoder {}