MTLClearColor
struct@objc_type(.encoding = "{MTLClearColor=dddd}")
MTLClearColor : struct {
red : f64 = 0.0
green : f64 = 0.0
blue : f64 = 0.0
alpha : f64 = 1.0
} Metal devices, buffers, textures, shaders, render pipelines, and command encoding.
36 structs · 129 functions · Public API
@objc_type(.encoding = "{MTLClearColor=dddd}")
MTLClearColor : struct {
red : f64 = 0.0
green : f64 = 0.0
blue : f64 = 0.0
alpha : f64 = 1.0
} @objc_type(.encoding = "{MTLOrigin=QQQ}")
MTLOrigin : struct {
x : core.NSUInteger = 0
y : core.NSUInteger = 0
z : core.NSUInteger = 0
} @objc_type(.encoding = "{MTLSize=QQQ}")
MTLSize : struct {
width : core.NSUInteger = 0
height : core.NSUInteger = 0
depth : core.NSUInteger = 0
} @objc_type(.encoding = "{MTLRegion={MTLOrigin=QQQ}{MTLSize=QQQ}}")
MTLRegion : struct {
origin : MTLOrigin {}
size : MTLSize {}
} @objc_type(.encoding = "{MTLScissorRect=QQQQ}")
MTLScissorRect : struct {
x : core.NSUInteger = 0
y : core.NSUInteger = 0
width : core.NSUInteger = 0
height : core.NSUInteger = 0
} @objc_type(.encoding = "{MTLViewport=dddddd}")
MTLViewport : struct {
origin_x : f64 = 0.0
origin_y : f64 = 0.0
width : f64 = 0.0
height : f64 = 0.0
znear : f64 = 0.0
zfar : f64 = 1.0
} @objc_object(.kind = "protocol_object", .handle = "handle")
MTLObject : struct {
handle : core.ObjCId = null
} @objc_object(.kind = "protocol_object", .handle = "handle")
MTLDevice : struct {
handle : core.ObjCId = null
} @objc_object(.kind = "protocol_object", .handle = "handle")
MTLCommandQueue : struct {
handle : core.ObjCId = null
} @objc_object(.kind = "protocol_object", .handle = "handle")
MTLCommandBuffer : struct {
handle : core.ObjCId = null
} @objc_object(.kind = "protocol_object", .handle = "handle")
MTLRenderCommandEncoder : struct {
handle : core.ObjCId = null
} @objc_object(.runtime_name = "MTLRenderPassDescriptor", .handle = "handle")
MTLRenderPassDescriptor : struct {
handle : core.ObjCId = null
} @objc_object(.runtime_name = "MTLRenderPassColorAttachmentDescriptor", .handle = "handle")
MTLRenderPassColorAttachmentDescriptor : struct {
handle : core.ObjCId = null
} @objc_object(.runtime_name = "MTLRenderPipelineDescriptor", .handle = "handle")
MTLRenderPipelineDescriptor : struct {
handle : core.ObjCId = null
} @objc_object(.runtime_name = "MTLRenderPipelineColorAttachmentDescriptor", .handle = "handle")
MTLRenderPipelineColorAttachmentDescriptor : struct {
handle : core.ObjCId = null
} @objc_object(.kind = "protocol_object", .handle = "handle")
MTLRenderPipelineState : struct {
handle : core.ObjCId = null
} @objc_object(.kind = "protocol_object", .handle = "handle")
MTLLibrary : struct {
handle : core.ObjCId = null
} @objc_object(.runtime_name = "MTLCompileOptions", .handle = "handle")
MTLCompileOptions : struct {
handle : core.ObjCId = null
} @objc_object(.kind = "protocol_object", .handle = "handle")
MTLFunction : struct {
handle : core.ObjCId = null
} @objc_object(.kind = "protocol_object", .handle = "handle")
MTLBuffer : struct {
handle : core.ObjCId = null
} @objc_object(.kind = "protocol_object", .handle = "handle")
MTLTexture : struct {
handle : core.ObjCId = null
} @objc_object(.runtime_name = "MTLTextureDescriptor", .handle = "handle")
MTLTextureDescriptor : struct {
handle : core.ObjCId = null
} @objc_object(.kind = "protocol_object", .handle = "handle")
MTLSamplerState : struct {
handle : core.ObjCId = null
} @objc_object(.runtime_name = "MTLSamplerDescriptor", .handle = "handle")
MTLSamplerDescriptor : struct {
handle : core.ObjCId = null
} @objc_object(.kind = "protocol_object", .handle = "handle")
MTLResidencySet : struct {
handle : core.ObjCId = null
} @objc_object(.kind = "protocol_object", .handle = "handle")
MTLDrawable : struct {
handle : core.ObjCId = null
} @objc_object(.runtime_name = "MTL4RenderPassDescriptor", .handle = "handle")
MTL4RenderPassDescriptor : struct {
handle : core.ObjCId = null
} @objc_object(.kind = "protocol_object", .handle = "handle")
MTLEvent : struct {
handle : core.ObjCId = null
} @objc_object(.runtime_name = "MTLVertexDescriptor", .handle = "handle")
MTLVertexDescriptor : struct {
handle : core.ObjCId = null
} @objc_object(.runtime_name = "MTLVertexAttributeDescriptorArray", .handle = "handle")
MTLVertexAttributeDescriptorArray : struct {
handle : core.ObjCId = null
} @objc_object(.runtime_name = "MTLVertexBufferLayoutDescriptorArray", .handle = "handle")
MTLVertexBufferLayoutDescriptorArray : struct {
handle : core.ObjCId = null
} @objc_object(.runtime_name = "MTLVertexAttributeDescriptor", .handle = "handle")
MTLVertexAttributeDescriptor : struct {
handle : core.ObjCId = null
} @objc_object(.runtime_name = "MTLVertexBufferLayoutDescriptor", .handle = "handle")
MTLVertexBufferLayoutDescriptor : struct {
handle : core.ObjCId = null
} @objc_object(.kind = "protocol_object", .handle = "handle")
MTLBlitCommandEncoder : struct {
handle : core.ObjCId = null
} @objc_object(.runtime_name = "MTLRenderPassColorAttachmentDescriptorArray", .handle = "handle")
MTLRenderPassColorAttachmentDescriptorArray : struct {
handle : core.ObjCId = null
} @objc_object(.runtime_name = "MTLRenderPipelineColorAttachmentDescriptorArray", .handle = "handle")
MTLRenderPipelineColorAttachmentDescriptorArray : struct {
handle : core.ObjCId = null
} static_cpu_to_gpu_buffer_options : func() -> MTLResourceOptions dynamic_cpu_to_gpu_buffer_options : func() -> MTLResourceOptions gpu_only_buffer_options : func() -> MTLResourceOptions MTLCreateSystemDefaultDevice : func() -> core.ObjCId Region2D : func(x : core.NSUInteger, y : core.NSUInteger, width : core.NSUInteger, height : core.NSUInteger) -> MTLRegion class_RenderPassDescriptor : func() -> core.ObjCClass class_CompileOptions : func() -> core.ObjCClass class_RenderPipelineDescriptor : func() -> core.ObjCClass class_TextureDescriptor : func() -> core.ObjCClass class_SamplerDescriptor : func() -> core.ObjCClass class_VertexDescriptor : func() -> core.ObjCClass texture2d_descriptor : func(format : MTLPixelFormat, width : core.NSUInteger, height : core.NSUInteger, mipmapped : bool) -> MTLTextureDescriptor create_TextureDescriptor : func() -> MTLTextureDescriptor default_device : func() -> MTLDevice alloc_CompileOptions : func() -> MTLCompileOptions create_CompileOptions : func() -> MTLCompileOptions create_RenderPassDescriptor : func() -> MTLRenderPassDescriptor create_RenderPipelineDescriptor : func() -> MTLRenderPipelineDescriptor create_SamplerDescriptor : func() -> MTLSamplerDescriptor create_VertexDescriptor : func() -> MTLVertexDescriptor set_label : func(self : ^MTLObject, label : ^foundation.NSString) is_valid : func(self : ^MTLDevice) -> bool deinit : func(self : ^MTLDevice) new_command_queue : func(self : ^MTLDevice) -> MTLCommandQueue new_buffer : func(self : ^MTLDevice, bytes : ^u8, length : core.NSUInteger, options : MTLResourceOptions) -> MTLBuffer new_buffer_with_length : func(self : ^MTLDevice, length : core.NSUInteger, options : MTLResourceOptions) -> MTLBuffer new_texture : func(self : ^MTLDevice, descriptor : ^MTLTextureDescriptor) -> MTLTexture new_default_library : func(self : ^MTLDevice) -> MTLLibrary new_library_from_source : func(self : ^MTLDevice, source : ^foundation.NSString, options : ^MTLCompileOptions) -> [MTLLibrary, foundation.NSError] new_library_from_source_utf8 : func(self : ^MTLDevice, source : cstring, options : ^MTLCompileOptions) -> [MTLLibrary, foundation.NSError] new_library_from_file : func(self : ^MTLDevice, path : ^foundation.NSString) -> [MTLLibrary, foundation.NSError] new_library_from_file_utf8 : func(self : ^MTLDevice, path : cstring) -> [MTLLibrary, foundation.NSError] new_render_pipeline_state : func(self : ^MTLDevice, descriptor : ^MTLRenderPipelineDescriptor) -> MTLRenderPipelineState new_render_pipeline_state_checked : func(self : ^MTLDevice, descriptor : ^MTLRenderPipelineDescriptor) -> [MTLRenderPipelineState, foundation.NSError] new_sampler_state : func(self : ^MTLDevice, descriptor : ^MTLSamplerDescriptor) -> MTLSamplerState new_library_from_data : func(self : ^MTLDevice, data : RawPtr) -> [MTLLibrary, foundation.NSError] new_event : func(self : ^MTLDevice) -> MTLEvent deinit : func(self : ^MTLCommandQueue) command_buffer : func(self : ^MTLCommandQueue) -> MTLCommandBuffer deinit : func(self : ^MTLCommandBuffer) render_command_encoder : func(self : ^MTLCommandBuffer, descriptor : ^MTLRenderPassDescriptor) -> MTLRenderCommandEncoder present_drawable : func(self : ^MTLCommandBuffer, drawable : ^MTLDrawable) commit : func(self : ^MTLCommandBuffer) wait_until_completed : func(self : ^MTLCommandBuffer) blit_command_encoder : func(self : ^MTLCommandBuffer) -> MTLBlitCommandEncoder encode_wait_for_event : func(self : ^MTLCommandBuffer, event : ^MTLEvent, value : u64) encode_signal_event : func(self : ^MTLCommandBuffer, event : ^MTLEvent, value : u64) deinit : func(self : ^MTLRenderCommandEncoder) set_render_pipeline_state : func(self : ^MTLRenderCommandEncoder, pipeline_state : ^MTLRenderPipelineState) set_vertex_buffer : func(self : ^MTLRenderCommandEncoder, buffer : ^MTLBuffer, offset : core.NSUInteger, index : core.NSUInteger) set_vertex_bytes : func(self : ^MTLRenderCommandEncoder, bytes : ^u8, length : core.NSUInteger, index : core.NSUInteger) set_fragment_texture : func(self : ^MTLRenderCommandEncoder, texture : ^MTLTexture, index : core.NSUInteger) set_scissor_rect : func(self : ^MTLRenderCommandEncoder, rect : MTLScissorRect) draw_primitives : func(self : ^MTLRenderCommandEncoder, primitive_type : MTLPrimitiveType, vertex_start : core.NSUInteger, vertex_count : core.NSUInteger) draw_primitives_instanced : func(self : ^MTLRenderCommandEncoder, primitive_type : MTLPrimitiveType, vertex_start : core.NSUInteger, vertex_count : core.NSUInteger, instance_count : core.NSUInteger, base_instance : core.NSUInteger) set_viewport : func(self : ^MTLRenderCommandEncoder, viewport : MTLViewport) set_fragment_sampler_state : func(self : ^MTLRenderCommandEncoder, sampler : ^MTLSamplerState, index : core.NSUInteger) draw_indexed_primitives : func(self : ^MTLRenderCommandEncoder, primitive_type : MTLPrimitiveType, index_count : core.NSUInteger, index_type : MTLIndexType, index_buffer : ^MTLBuffer, index_buffer_offset : core.NSUInteger, instance_count : core.NSUInteger, base_vertex : core.NSInteger, base_instance : core.NSUInteger) end_encoding : func(self : ^MTLRenderCommandEncoder) deinit : func(self : ^MTLRenderPassDescriptor) color_attachment : func(self : ^MTLRenderPassDescriptor, index : core.NSUInteger) -> MTLRenderPassColorAttachmentDescriptor set_texture : func(self : ^MTLRenderPassColorAttachmentDescriptor, texture : ^MTLTexture) set_load_action : func(self : ^MTLRenderPassColorAttachmentDescriptor, action : MTLLoadAction) set_store_action : func(self : ^MTLRenderPassColorAttachmentDescriptor, action : MTLStoreAction) set_clear_color : func(self : ^MTLRenderPassColorAttachmentDescriptor, color : MTLClearColor) deinit : func(self : ^MTLRenderPipelineDescriptor) set_vertex_function : func(self : ^MTLRenderPipelineDescriptor, function : ^MTLFunction) set_fragment_function : func(self : ^MTLRenderPipelineDescriptor, function : ^MTLFunction) set_vertex_descriptor : func(self : ^MTLRenderPipelineDescriptor, descriptor : ^MTLVertexDescriptor) set_depth_attachment_pixel_format : func(self : ^MTLRenderPipelineDescriptor, format : MTLPixelFormat) color_attachment : func(self : ^MTLRenderPipelineDescriptor, index : core.NSUInteger) -> MTLRenderPipelineColorAttachmentDescriptor set_pixel_format : func(self : ^MTLRenderPipelineColorAttachmentDescriptor, format : MTLPixelFormat) set_blending_enabled : func(self : ^MTLRenderPipelineColorAttachmentDescriptor, enabled : bool) set_alpha_blending : func(self : ^MTLRenderPipelineColorAttachmentDescriptor) deinit : func(self : ^MTLRenderPipelineState) is_valid : func(self : ^MTLRenderPipelineState) -> bool deinit : func(self : ^MTLLibrary) is_valid : func(self : ^MTLLibrary) -> bool deinit : func(self : ^MTLCompileOptions) is_valid : func(self : ^MTLCompileOptions) -> bool set_fast_math_enabled : func(self : ^MTLCompileOptions, enabled : bool) set_language_version : func(self : ^MTLCompileOptions, version : MTLLanguageVersion) set_library_type : func(self : ^MTLCompileOptions, library_type : MTLLibraryType) set_install_name : func(self : ^MTLCompileOptions, name : ^foundation.NSString) set_install_name_utf8 : func(self : ^MTLCompileOptions, name : cstring) set_preserve_invariance : func(self : ^MTLCompileOptions, enabled : bool) set_optimization_level : func(self : ^MTLCompileOptions, level : MTLLibraryOptimizationLevel) set_math_mode : func(self : ^MTLCompileOptions, mode : MTLMathMode) set_math_floating_point_functions : func(self : ^MTLCompileOptions, functions : MTLMathFloatingPointFunctions) set_compile_symbol_visibility : func(self : ^MTLCompileOptions, visibility : MTLCompileSymbolVisibility) new_function : func(self : ^MTLLibrary, name : cstring) -> MTLFunction deinit : func(self : ^MTLFunction) is_valid : func(self : ^MTLFunction) -> bool deinit : func(self : ^MTLBuffer) deinit : func(self : ^MTLTextureDescriptor) set_texture_type : func(self : ^MTLTextureDescriptor, texture_type : MTLTextureType) set_pixel_format : func(self : ^MTLTextureDescriptor, format : MTLPixelFormat) set_width : func(self : ^MTLTextureDescriptor, width : core.NSUInteger) set_height : func(self : ^MTLTextureDescriptor, height : core.NSUInteger) set_mipmap_level_count : func(self : ^MTLTextureDescriptor, count : core.NSUInteger) set_array_length : func(self : ^MTLTextureDescriptor, length : core.NSUInteger) set_sample_count : func(self : ^MTLTextureDescriptor, count : core.NSUInteger) set_usage : func(self : ^MTLTextureDescriptor, usage : u64) set_storage_mode : func(self : ^MTLTextureDescriptor, mode : MTLStorageMode) deinit : func(self : ^MTLSamplerDescriptor) set_min_filter : func(self : ^MTLSamplerDescriptor, filter : MTLSamplerMinMagFilter) set_mag_filter : func(self : ^MTLSamplerDescriptor, filter : MTLSamplerMinMagFilter) set_s_address_mode : func(self : ^MTLSamplerDescriptor, mode : MTLSamplerAddressMode) set_t_address_mode : func(self : ^MTLSamplerDescriptor, mode : MTLSamplerAddressMode) deinit : func(self : ^MTLSamplerState) deinit : func(self : ^MTLEvent) deinit : func(self : ^MTLTexture) replace_region : func(self : ^MTLTexture, region : MTLRegion, level : core.NSUInteger, bytes : ^u8, bytes_per_row : core.NSUInteger) contents : func(self : ^MTLBuffer) -> ^u8 len : func(self : ^MTLBuffer) -> core.NSUInteger width : func(self : ^MTLTexture) -> core.NSUInteger height : func(self : ^MTLTexture) -> core.NSUInteger deinit : func(self : ^MTLVertexDescriptor) attributes : func(self : ^MTLVertexDescriptor) -> MTLVertexAttributeDescriptorArray layouts : func(self : ^MTLVertexDescriptor) -> MTLVertexBufferLayoutDescriptorArray attribute : func(self : ^MTLVertexAttributeDescriptorArray, index : core.NSUInteger) -> MTLVertexAttributeDescriptor layout : func(self : ^MTLVertexBufferLayoutDescriptorArray, index : core.NSUInteger) -> MTLVertexBufferLayoutDescriptor set_format : func(self : ^MTLVertexAttributeDescriptor, format : MTLVertexFormat) set_offset : func(self : ^MTLVertexAttributeDescriptor, offset : core.NSUInteger) set_buffer_index : func(self : ^MTLVertexAttributeDescriptor, index : core.NSUInteger) set_stride : func(self : ^MTLVertexBufferLayoutDescriptor, stride : core.NSUInteger) set_step_function : func(self : ^MTLVertexBufferLayoutDescriptor, step_function : MTLVertexStepFunction) copy_buffer_to_texture : func(
self : ^MTLBlitCommandEncoder,
source : ^MTLBuffer,
source_offset : core.NSUInteger,
source_bytes_per_row : core.NSUInteger,
source_bytes_per_image : core.NSUInteger,
source_size : MTLSize,
destination : ^MTLTexture,
destination_slice : core.NSUInteger,
destination_level : core.NSUInteger,
destination_origin : MTLOrigin
) end_encoding : func(self : ^MTLBlitCommandEncoder)