class WGPU::Surface
- WGPU::Surface
- WGPU::WgpuId
- Reference
- Object
Defined in:
wgpu.crConstructors
- .from_metal_layer(label : String, layer : Pointer(Void)) : Surface
- .from_windows_hwnd(label : String, hinstance : Pointer(Void), hwnd : Pointer(Void)) : Surface
- .from_xlib(label : String, display : Pointer(Void), window : UInt32) : Surface
Instance Method Summary
- #descriptor : LibWGPU::SurfaceDescriptor
-
#preferred_format(adapter : Adapter) : Future::Compute(TextureFormat)
Asynchronously retreive the preferred
TextureFormat
for this Surface. -
#preferred_format : Future::Compute(TextureFormat) | Nil
Lazy getter to retreive the preferred
TextureFormat
for this Surface.
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_windows_hwnd(label : String, hinstance : Pointer(Void), hwnd : Pointer(Void)) : Surface
#
Instance Method Detail
Asynchronously retreive the preferred TextureFormat
for this Surface.
See Also: Future::Compute
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