use core::ffi::*;
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct MTLClearColor {
pub red: c_double,
pub green: c_double,
pub blue: c_double,
pub alpha: c_double,
}
unsafe impl Encode for MTLClearColor {
const ENCODING: Encoding = Encoding::Struct(
"?",
&[
<c_double>::ENCODING,
<c_double>::ENCODING,
<c_double>::ENCODING,
<c_double>::ENCODING,
],
);
}
unsafe impl RefEncode for MTLClearColor {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
impl MTLClearColor {
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct MTLLoadAction(pub NSUInteger);
impl MTLLoadAction {
#[doc(alias = "MTLLoadActionDontCare")]
pub const DontCare: Self = Self(0);
#[doc(alias = "MTLLoadActionLoad")]
pub const Load: Self = Self(1);
#[doc(alias = "MTLLoadActionClear")]
pub const Clear: Self = Self(2);
}
unsafe impl Encode for MTLLoadAction {
const ENCODING: Encoding = NSUInteger::ENCODING;
}
unsafe impl RefEncode for MTLLoadAction {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct MTLStoreAction(pub NSUInteger);
impl MTLStoreAction {
#[doc(alias = "MTLStoreActionDontCare")]
pub const DontCare: Self = Self(0);
#[doc(alias = "MTLStoreActionStore")]
pub const Store: Self = Self(1);
#[doc(alias = "MTLStoreActionMultisampleResolve")]
pub const MultisampleResolve: Self = Self(2);
#[doc(alias = "MTLStoreActionStoreAndMultisampleResolve")]
pub const StoreAndMultisampleResolve: Self = Self(3);
#[doc(alias = "MTLStoreActionUnknown")]
pub const Unknown: Self = Self(4);
#[doc(alias = "MTLStoreActionCustomSampleDepthStore")]
pub const CustomSampleDepthStore: Self = Self(5);
}
unsafe impl Encode for MTLStoreAction {
const ENCODING: Encoding = NSUInteger::ENCODING;
}
unsafe impl RefEncode for MTLStoreAction {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct MTLStoreActionOptions(pub NSUInteger);
bitflags::bitflags! {
impl MTLStoreActionOptions: NSUInteger {
#[doc(alias = "MTLStoreActionOptionNone")]
const None = 0;
#[doc(alias = "MTLStoreActionOptionCustomSamplePositions")]
const CustomSamplePositions = 1<<0;
}
}
unsafe impl Encode for MTLStoreActionOptions {
const ENCODING: Encoding = NSUInteger::ENCODING;
}
unsafe impl RefEncode for MTLStoreActionOptions {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct MTLVisibilityResultType(pub NSInteger);
impl MTLVisibilityResultType {
#[doc(alias = "MTLVisibilityResultTypeReset")]
pub const Reset: Self = Self(0);
#[doc(alias = "MTLVisibilityResultTypeAccumulate")]
pub const Accumulate: Self = Self(1);
}
unsafe impl Encode for MTLVisibilityResultType {
const ENCODING: Encoding = NSInteger::ENCODING;
}
unsafe impl RefEncode for MTLVisibilityResultType {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
extern_class!(
#[unsafe(super(NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct MTLRenderPassAttachmentDescriptor;
);
extern_conformance!(
unsafe impl NSCopying for MTLRenderPassAttachmentDescriptor {}
);
unsafe impl CopyingHelper for MTLRenderPassAttachmentDescriptor {
type Result = Self;
}
extern_conformance!(
unsafe impl NSObjectProtocol for MTLRenderPassAttachmentDescriptor {}
);
impl MTLRenderPassAttachmentDescriptor {
extern_methods!(
#[cfg(all(
feature = "MTLAllocation",
feature = "MTLResource",
feature = "MTLTexture"
))]
#[unsafe(method(texture))]
#[unsafe(method_family = none)]
pub fn texture(&self) -> Option<Retained<ProtocolObject<dyn MTLTexture>>>;
#[cfg(all(
feature = "MTLAllocation",
feature = "MTLResource",
feature = "MTLTexture"
))]
#[unsafe(method(setTexture:))]
#[unsafe(method_family = none)]
pub fn setTexture(&self, texture: Option<&ProtocolObject<dyn MTLTexture>>);
#[unsafe(method(level))]
#[unsafe(method_family = none)]
pub fn level(&self) -> NSUInteger;
#[unsafe(method(setLevel:))]
#[unsafe(method_family = none)]
pub fn setLevel(&self, level: NSUInteger);
#[unsafe(method(slice))]
#[unsafe(method_family = none)]
pub fn slice(&self) -> NSUInteger;
#[unsafe(method(setSlice:))]
#[unsafe(method_family = none)]
pub fn setSlice(&self, slice: NSUInteger);
#[unsafe(method(depthPlane))]
#[unsafe(method_family = none)]
pub fn depthPlane(&self) -> NSUInteger;
#[unsafe(method(setDepthPlane:))]
#[unsafe(method_family = none)]
pub fn setDepthPlane(&self, depth_plane: NSUInteger);
#[cfg(all(
feature = "MTLAllocation",
feature = "MTLResource",
feature = "MTLTexture"
))]
#[unsafe(method(resolveTexture))]
#[unsafe(method_family = none)]
pub fn resolveTexture(&self) -> Option<Retained<ProtocolObject<dyn MTLTexture>>>;
#[cfg(all(
feature = "MTLAllocation",
feature = "MTLResource",
feature = "MTLTexture"
))]
#[unsafe(method(setResolveTexture:))]
#[unsafe(method_family = none)]
pub fn setResolveTexture(&self, resolve_texture: Option<&ProtocolObject<dyn MTLTexture>>);
#[unsafe(method(resolveLevel))]
#[unsafe(method_family = none)]
pub fn resolveLevel(&self) -> NSUInteger;
#[unsafe(method(setResolveLevel:))]
#[unsafe(method_family = none)]
pub fn setResolveLevel(&self, resolve_level: NSUInteger);
#[unsafe(method(resolveSlice))]
#[unsafe(method_family = none)]
pub fn resolveSlice(&self) -> NSUInteger;
#[unsafe(method(setResolveSlice:))]
#[unsafe(method_family = none)]
pub fn setResolveSlice(&self, resolve_slice: NSUInteger);
#[unsafe(method(resolveDepthPlane))]
#[unsafe(method_family = none)]
pub fn resolveDepthPlane(&self) -> NSUInteger;
#[unsafe(method(setResolveDepthPlane:))]
#[unsafe(method_family = none)]
pub fn setResolveDepthPlane(&self, resolve_depth_plane: NSUInteger);
#[unsafe(method(loadAction))]
#[unsafe(method_family = none)]
pub fn loadAction(&self) -> MTLLoadAction;
#[unsafe(method(setLoadAction:))]
#[unsafe(method_family = none)]
pub fn setLoadAction(&self, load_action: MTLLoadAction);
#[unsafe(method(storeAction))]
#[unsafe(method_family = none)]
pub fn storeAction(&self) -> MTLStoreAction;
#[unsafe(method(setStoreAction:))]
#[unsafe(method_family = none)]
pub fn setStoreAction(&self, store_action: MTLStoreAction);
#[unsafe(method(storeActionOptions))]
#[unsafe(method_family = none)]
pub fn storeActionOptions(&self) -> MTLStoreActionOptions;
#[unsafe(method(setStoreActionOptions:))]
#[unsafe(method_family = none)]
pub fn setStoreActionOptions(&self, store_action_options: MTLStoreActionOptions);
);
}
impl MTLRenderPassAttachmentDescriptor {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub fn init(this: Allocated<Self>) -> Retained<Self>;
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub fn new() -> Retained<Self>;
);
}
impl DefaultRetained for MTLRenderPassAttachmentDescriptor {
#[inline]
fn default_retained() -> Retained<Self> {
Self::new()
}
}
extern_class!(
#[unsafe(super(MTLRenderPassAttachmentDescriptor, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct MTLRenderPassColorAttachmentDescriptor;
);
extern_conformance!(
unsafe impl NSCopying for MTLRenderPassColorAttachmentDescriptor {}
);
unsafe impl CopyingHelper for MTLRenderPassColorAttachmentDescriptor {
type Result = Self;
}
extern_conformance!(
unsafe impl NSObjectProtocol for MTLRenderPassColorAttachmentDescriptor {}
);
impl MTLRenderPassColorAttachmentDescriptor {
extern_methods!(
#[unsafe(method(clearColor))]
#[unsafe(method_family = none)]
pub fn clearColor(&self) -> MTLClearColor;
#[unsafe(method(setClearColor:))]
#[unsafe(method_family = none)]
pub fn setClearColor(&self, clear_color: MTLClearColor);
);
}
impl MTLRenderPassColorAttachmentDescriptor {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub fn init(this: Allocated<Self>) -> Retained<Self>;
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub fn new() -> Retained<Self>;
);
}
impl DefaultRetained for MTLRenderPassColorAttachmentDescriptor {
#[inline]
fn default_retained() -> Retained<Self> {
Self::new()
}
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct MTLMultisampleDepthResolveFilter(pub NSUInteger);
impl MTLMultisampleDepthResolveFilter {
#[doc(alias = "MTLMultisampleDepthResolveFilterSample0")]
pub const Sample0: Self = Self(0);
#[doc(alias = "MTLMultisampleDepthResolveFilterMin")]
pub const Min: Self = Self(1);
#[doc(alias = "MTLMultisampleDepthResolveFilterMax")]
pub const Max: Self = Self(2);
}
unsafe impl Encode for MTLMultisampleDepthResolveFilter {
const ENCODING: Encoding = NSUInteger::ENCODING;
}
unsafe impl RefEncode for MTLMultisampleDepthResolveFilter {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
extern_class!(
#[unsafe(super(MTLRenderPassAttachmentDescriptor, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct MTLRenderPassDepthAttachmentDescriptor;
);
extern_conformance!(
unsafe impl NSCopying for MTLRenderPassDepthAttachmentDescriptor {}
);
unsafe impl CopyingHelper for MTLRenderPassDepthAttachmentDescriptor {
type Result = Self;
}
extern_conformance!(
unsafe impl NSObjectProtocol for MTLRenderPassDepthAttachmentDescriptor {}
);
impl MTLRenderPassDepthAttachmentDescriptor {
extern_methods!(
#[unsafe(method(clearDepth))]
#[unsafe(method_family = none)]
pub fn clearDepth(&self) -> c_double;
#[unsafe(method(setClearDepth:))]
#[unsafe(method_family = none)]
pub fn setClearDepth(&self, clear_depth: c_double);
#[unsafe(method(depthResolveFilter))]
#[unsafe(method_family = none)]
pub fn depthResolveFilter(&self) -> MTLMultisampleDepthResolveFilter;
#[unsafe(method(setDepthResolveFilter:))]
#[unsafe(method_family = none)]
pub fn setDepthResolveFilter(&self, depth_resolve_filter: MTLMultisampleDepthResolveFilter);
);
}
impl MTLRenderPassDepthAttachmentDescriptor {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub fn init(this: Allocated<Self>) -> Retained<Self>;
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub fn new() -> Retained<Self>;
);
}
impl DefaultRetained for MTLRenderPassDepthAttachmentDescriptor {
#[inline]
fn default_retained() -> Retained<Self> {
Self::new()
}
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct MTLMultisampleStencilResolveFilter(pub NSUInteger);
impl MTLMultisampleStencilResolveFilter {
#[doc(alias = "MTLMultisampleStencilResolveFilterSample0")]
pub const Sample0: Self = Self(0);
#[doc(alias = "MTLMultisampleStencilResolveFilterDepthResolvedSample")]
pub const DepthResolvedSample: Self = Self(1);
}
unsafe impl Encode for MTLMultisampleStencilResolveFilter {
const ENCODING: Encoding = NSUInteger::ENCODING;
}
unsafe impl RefEncode for MTLMultisampleStencilResolveFilter {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
extern_class!(
#[unsafe(super(MTLRenderPassAttachmentDescriptor, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct MTLRenderPassStencilAttachmentDescriptor;
);
extern_conformance!(
unsafe impl NSCopying for MTLRenderPassStencilAttachmentDescriptor {}
);
unsafe impl CopyingHelper for MTLRenderPassStencilAttachmentDescriptor {
type Result = Self;
}
extern_conformance!(
unsafe impl NSObjectProtocol for MTLRenderPassStencilAttachmentDescriptor {}
);
impl MTLRenderPassStencilAttachmentDescriptor {
extern_methods!(
#[unsafe(method(clearStencil))]
#[unsafe(method_family = none)]
pub fn clearStencil(&self) -> u32;
#[unsafe(method(setClearStencil:))]
#[unsafe(method_family = none)]
pub fn setClearStencil(&self, clear_stencil: u32);
#[unsafe(method(stencilResolveFilter))]
#[unsafe(method_family = none)]
pub fn stencilResolveFilter(&self) -> MTLMultisampleStencilResolveFilter;
#[unsafe(method(setStencilResolveFilter:))]
#[unsafe(method_family = none)]
pub fn setStencilResolveFilter(
&self,
stencil_resolve_filter: MTLMultisampleStencilResolveFilter,
);
);
}
impl MTLRenderPassStencilAttachmentDescriptor {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub fn init(this: Allocated<Self>) -> Retained<Self>;
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub fn new() -> Retained<Self>;
);
}
impl DefaultRetained for MTLRenderPassStencilAttachmentDescriptor {
#[inline]
fn default_retained() -> Retained<Self> {
Self::new()
}
}
extern_class!(
#[unsafe(super(NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct MTLRenderPassColorAttachmentDescriptorArray;
);
extern_conformance!(
unsafe impl NSObjectProtocol for MTLRenderPassColorAttachmentDescriptorArray {}
);
impl MTLRenderPassColorAttachmentDescriptorArray {
extern_methods!(
#[unsafe(method(objectAtIndexedSubscript:))]
#[unsafe(method_family = none)]
pub unsafe fn objectAtIndexedSubscript(
&self,
attachment_index: NSUInteger,
) -> Retained<MTLRenderPassColorAttachmentDescriptor>;
#[unsafe(method(setObject:atIndexedSubscript:))]
#[unsafe(method_family = none)]
pub unsafe fn setObject_atIndexedSubscript(
&self,
attachment: Option<&MTLRenderPassColorAttachmentDescriptor>,
attachment_index: NSUInteger,
);
);
}
impl MTLRenderPassColorAttachmentDescriptorArray {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub fn init(this: Allocated<Self>) -> Retained<Self>;
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub fn new() -> Retained<Self>;
);
}
impl DefaultRetained for MTLRenderPassColorAttachmentDescriptorArray {
#[inline]
fn default_retained() -> Retained<Self> {
Self::new()
}
}
extern_class!(
#[unsafe(super(NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct MTLRenderPassSampleBufferAttachmentDescriptor;
);
extern_conformance!(
unsafe impl NSCopying for MTLRenderPassSampleBufferAttachmentDescriptor {}
);
unsafe impl CopyingHelper for MTLRenderPassSampleBufferAttachmentDescriptor {
type Result = Self;
}
extern_conformance!(
unsafe impl NSObjectProtocol for MTLRenderPassSampleBufferAttachmentDescriptor {}
);
impl MTLRenderPassSampleBufferAttachmentDescriptor {
extern_methods!(
#[cfg(feature = "MTLCounters")]
#[unsafe(method(sampleBuffer))]
#[unsafe(method_family = none)]
pub fn sampleBuffer(&self) -> Option<Retained<ProtocolObject<dyn MTLCounterSampleBuffer>>>;
#[cfg(feature = "MTLCounters")]
#[unsafe(method(setSampleBuffer:))]
#[unsafe(method_family = none)]
pub fn setSampleBuffer(
&self,
sample_buffer: Option<&ProtocolObject<dyn MTLCounterSampleBuffer>>,
);
#[unsafe(method(startOfVertexSampleIndex))]
#[unsafe(method_family = none)]
pub fn startOfVertexSampleIndex(&self) -> NSUInteger;
#[unsafe(method(setStartOfVertexSampleIndex:))]
#[unsafe(method_family = none)]
pub unsafe fn setStartOfVertexSampleIndex(&self, start_of_vertex_sample_index: NSUInteger);
#[unsafe(method(endOfVertexSampleIndex))]
#[unsafe(method_family = none)]
pub fn endOfVertexSampleIndex(&self) -> NSUInteger;
#[unsafe(method(setEndOfVertexSampleIndex:))]
#[unsafe(method_family = none)]
pub unsafe fn setEndOfVertexSampleIndex(&self, end_of_vertex_sample_index: NSUInteger);
#[unsafe(method(startOfFragmentSampleIndex))]
#[unsafe(method_family = none)]
pub fn startOfFragmentSampleIndex(&self) -> NSUInteger;
#[unsafe(method(setStartOfFragmentSampleIndex:))]
#[unsafe(method_family = none)]
pub unsafe fn setStartOfFragmentSampleIndex(
&self,
start_of_fragment_sample_index: NSUInteger,
);
#[unsafe(method(endOfFragmentSampleIndex))]
#[unsafe(method_family = none)]
pub fn endOfFragmentSampleIndex(&self) -> NSUInteger;
#[unsafe(method(setEndOfFragmentSampleIndex:))]
#[unsafe(method_family = none)]
pub unsafe fn setEndOfFragmentSampleIndex(&self, end_of_fragment_sample_index: NSUInteger);
);
}
impl MTLRenderPassSampleBufferAttachmentDescriptor {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub fn init(this: Allocated<Self>) -> Retained<Self>;
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub fn new() -> Retained<Self>;
);
}
impl DefaultRetained for MTLRenderPassSampleBufferAttachmentDescriptor {
#[inline]
fn default_retained() -> Retained<Self> {
Self::new()
}
}
extern_class!(
#[unsafe(super(NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct MTLRenderPassSampleBufferAttachmentDescriptorArray;
);
extern_conformance!(
unsafe impl NSObjectProtocol for MTLRenderPassSampleBufferAttachmentDescriptorArray {}
);
impl MTLRenderPassSampleBufferAttachmentDescriptorArray {
extern_methods!(
#[unsafe(method(objectAtIndexedSubscript:))]
#[unsafe(method_family = none)]
pub unsafe fn objectAtIndexedSubscript(
&self,
attachment_index: NSUInteger,
) -> Retained<MTLRenderPassSampleBufferAttachmentDescriptor>;
#[unsafe(method(setObject:atIndexedSubscript:))]
#[unsafe(method_family = none)]
pub unsafe fn setObject_atIndexedSubscript(
&self,
attachment: Option<&MTLRenderPassSampleBufferAttachmentDescriptor>,
attachment_index: NSUInteger,
);
);
}
impl MTLRenderPassSampleBufferAttachmentDescriptorArray {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub fn init(this: Allocated<Self>) -> Retained<Self>;
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub fn new() -> Retained<Self>;
);
}
impl DefaultRetained for MTLRenderPassSampleBufferAttachmentDescriptorArray {
#[inline]
fn default_retained() -> Retained<Self> {
Self::new()
}
}
extern_class!(
#[unsafe(super(NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct MTLRenderPassDescriptor;
);
extern_conformance!(
unsafe impl NSCopying for MTLRenderPassDescriptor {}
);
unsafe impl CopyingHelper for MTLRenderPassDescriptor {
type Result = Self;
}
extern_conformance!(
unsafe impl NSObjectProtocol for MTLRenderPassDescriptor {}
);
impl MTLRenderPassDescriptor {
extern_methods!(
#[unsafe(method(renderPassDescriptor))]
#[unsafe(method_family = none)]
pub fn renderPassDescriptor() -> Retained<MTLRenderPassDescriptor>;
#[unsafe(method(colorAttachments))]
#[unsafe(method_family = none)]
pub fn colorAttachments(&self) -> Retained<MTLRenderPassColorAttachmentDescriptorArray>;
#[unsafe(method(depthAttachment))]
#[unsafe(method_family = none)]
pub fn depthAttachment(&self) -> Retained<MTLRenderPassDepthAttachmentDescriptor>;
#[unsafe(method(setDepthAttachment:))]
#[unsafe(method_family = none)]
pub fn setDepthAttachment(
&self,
depth_attachment: Option<&MTLRenderPassDepthAttachmentDescriptor>,
);
#[unsafe(method(stencilAttachment))]
#[unsafe(method_family = none)]
pub fn stencilAttachment(&self) -> Retained<MTLRenderPassStencilAttachmentDescriptor>;
#[unsafe(method(setStencilAttachment:))]
#[unsafe(method_family = none)]
pub fn setStencilAttachment(
&self,
stencil_attachment: Option<&MTLRenderPassStencilAttachmentDescriptor>,
);
#[cfg(all(
feature = "MTLAllocation",
feature = "MTLBuffer",
feature = "MTLResource"
))]
#[unsafe(method(visibilityResultBuffer))]
#[unsafe(method_family = none)]
pub fn visibilityResultBuffer(&self) -> Option<Retained<ProtocolObject<dyn MTLBuffer>>>;
#[cfg(all(
feature = "MTLAllocation",
feature = "MTLBuffer",
feature = "MTLResource"
))]
#[unsafe(method(setVisibilityResultBuffer:))]
#[unsafe(method_family = none)]
pub fn setVisibilityResultBuffer(
&self,
visibility_result_buffer: Option<&ProtocolObject<dyn MTLBuffer>>,
);
#[unsafe(method(renderTargetArrayLength))]
#[unsafe(method_family = none)]
pub fn renderTargetArrayLength(&self) -> NSUInteger;
#[unsafe(method(setRenderTargetArrayLength:))]
#[unsafe(method_family = none)]
pub fn setRenderTargetArrayLength(&self, render_target_array_length: NSUInteger);
#[unsafe(method(imageblockSampleLength))]
#[unsafe(method_family = none)]
pub fn imageblockSampleLength(&self) -> NSUInteger;
#[unsafe(method(setImageblockSampleLength:))]
#[unsafe(method_family = none)]
pub fn setImageblockSampleLength(&self, imageblock_sample_length: NSUInteger);
#[unsafe(method(threadgroupMemoryLength))]
#[unsafe(method_family = none)]
pub fn threadgroupMemoryLength(&self) -> NSUInteger;
#[unsafe(method(setThreadgroupMemoryLength:))]
#[unsafe(method_family = none)]
pub fn setThreadgroupMemoryLength(&self, threadgroup_memory_length: NSUInteger);
#[unsafe(method(tileWidth))]
#[unsafe(method_family = none)]
pub fn tileWidth(&self) -> NSUInteger;
#[unsafe(method(setTileWidth:))]
#[unsafe(method_family = none)]
pub fn setTileWidth(&self, tile_width: NSUInteger);
#[unsafe(method(tileHeight))]
#[unsafe(method_family = none)]
pub fn tileHeight(&self) -> NSUInteger;
#[unsafe(method(setTileHeight:))]
#[unsafe(method_family = none)]
pub fn setTileHeight(&self, tile_height: NSUInteger);
#[unsafe(method(defaultRasterSampleCount))]
#[unsafe(method_family = none)]
pub fn defaultRasterSampleCount(&self) -> NSUInteger;
#[unsafe(method(setDefaultRasterSampleCount:))]
#[unsafe(method_family = none)]
pub fn setDefaultRasterSampleCount(&self, default_raster_sample_count: NSUInteger);
#[unsafe(method(renderTargetWidth))]
#[unsafe(method_family = none)]
pub fn renderTargetWidth(&self) -> NSUInteger;
#[unsafe(method(setRenderTargetWidth:))]
#[unsafe(method_family = none)]
pub fn setRenderTargetWidth(&self, render_target_width: NSUInteger);
#[unsafe(method(renderTargetHeight))]
#[unsafe(method_family = none)]
pub fn renderTargetHeight(&self) -> NSUInteger;
#[unsafe(method(setRenderTargetHeight:))]
#[unsafe(method_family = none)]
pub fn setRenderTargetHeight(&self, render_target_height: NSUInteger);
#[cfg(feature = "MTLTypes")]
#[unsafe(method(setSamplePositions:count:))]
#[unsafe(method_family = none)]
pub unsafe fn setSamplePositions_count(
&self,
positions: *const MTLSamplePosition,
count: NSUInteger,
);
#[cfg(feature = "MTLTypes")]
#[unsafe(method(getSamplePositions:count:))]
#[unsafe(method_family = none)]
pub unsafe fn getSamplePositions_count(
&self,
positions: *mut MTLSamplePosition,
count: NSUInteger,
) -> NSUInteger;
#[cfg(feature = "MTLRasterizationRate")]
#[unsafe(method(rasterizationRateMap))]
#[unsafe(method_family = none)]
pub fn rasterizationRateMap(
&self,
) -> Option<Retained<ProtocolObject<dyn MTLRasterizationRateMap>>>;
#[cfg(feature = "MTLRasterizationRate")]
#[unsafe(method(setRasterizationRateMap:))]
#[unsafe(method_family = none)]
pub fn setRasterizationRateMap(
&self,
rasterization_rate_map: Option<&ProtocolObject<dyn MTLRasterizationRateMap>>,
);
#[unsafe(method(sampleBufferAttachments))]
#[unsafe(method_family = none)]
pub fn sampleBufferAttachments(
&self,
) -> Retained<MTLRenderPassSampleBufferAttachmentDescriptorArray>;
#[unsafe(method(visibilityResultType))]
#[unsafe(method_family = none)]
pub fn visibilityResultType(&self) -> MTLVisibilityResultType;
#[unsafe(method(setVisibilityResultType:))]
#[unsafe(method_family = none)]
pub fn setVisibilityResultType(&self, visibility_result_type: MTLVisibilityResultType);
#[unsafe(method(supportColorAttachmentMapping))]
#[unsafe(method_family = none)]
pub fn supportColorAttachmentMapping(&self) -> bool;
#[unsafe(method(setSupportColorAttachmentMapping:))]
#[unsafe(method_family = none)]
pub fn setSupportColorAttachmentMapping(&self, support_color_attachment_mapping: bool);
);
}
impl MTLRenderPassDescriptor {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub fn init(this: Allocated<Self>) -> Retained<Self>;
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub fn new() -> Retained<Self>;
);
}
impl DefaultRetained for MTLRenderPassDescriptor {
#[inline]
fn default_retained() -> Retained<Self> {
Self::new()
}
}
impl MTLClearColor {
}