class WGPU::Surface

Defined in:

wgpu.cr

Constructors

Instance Method Summary

Instance methods inherited from class WGPU::WgpuId

finalize finalize, id : Pointer(Void) id, is_valid? is_valid?, to_unsafe : Pointer(Void) to_unsafe

Constructor Detail

def self.from_metal_layer(label : String, layer : Pointer(Void)) : Surface #

[View source]
def self.from_windows_hwnd(label : String, hinstance : Pointer(Void), hwnd : Pointer(Void)) : Surface #

[View source]
def self.from_xlib(label : String, display : Pointer(Void), window : UInt32) : Surface #

[View source]

Instance Method Detail

def descriptor : LibWGPU::SurfaceDescriptor #

[View source]
def preferred_format(adapter : Adapter) : Future::Compute(TextureFormat) #

Asynchronously retreive the preferred TextureFormat for this Surface.

See Also: Future::Compute


[View source]
def preferred_format : Future::Compute(TextureFormat) | Nil #

Lazy getter to retreive the preferred TextureFormat for this Surface. Call #preferred_format(adapter : Adapter) first.

See Also: Future::Compute


[View source]