GPUSurface


public final class GPUSurface implements AutoCloseable


Represents a native window or display surface that can be drawn to.

Summary

Public methods

external void
final external void

Configures the surface with a device, format, size, and other options.

boolean
equals(Object other)
final external @NonNull GPUSurfaceCapabilities

Gets the presentation capabilities supported by the surface for a given adapter.

final external @NonNull GPUSurfaceTexture

Gets the next available texture from the surface for rendering.

final long
int
final external void

Presents the currently acquired texture to the screen.

final external void

Sets a debug label for the surface.

final external void

Unconfigures the surface, releasing the texture resources.

Public methods

close

Added in 1.0.0-alpha02
public external void close()

configure

Added in 1.0.0-alpha02
@FastNative
public final external void configure(@NonNull GPUSurfaceConfiguration config)

Configures the surface with a device, format, size, and other options.

Parameters
@NonNull GPUSurfaceConfiguration config

The configuration settings for the surface.

equals

public boolean equals(Object other)

getCapabilities

Added in 1.0.0-alpha02
@FastNative
public final external @NonNull GPUSurfaceCapabilities getCapabilities(@NonNull GPUAdapter adapter)

Gets the presentation capabilities supported by the surface for a given adapter.

Parameters
@NonNull GPUAdapter adapter

The adapter used to query capabilities.

Returns
@NonNull GPUSurfaceCapabilities

Status code of the operation.

getCurrentTexture

Added in 1.0.0-alpha02
@FastNative
public final external @NonNull GPUSurfaceTexture getCurrentTexture()

Gets the next available texture from the surface for rendering.

getHandle

Added in 1.0.0-alpha02
public final long getHandle()

hashCode

public int hashCode()

present

Added in 1.0.0-alpha02
@FastNative
public final external void present()

Presents the currently acquired texture to the screen.

Returns
void

Status code of the operation.

setLabel

Added in 1.0.0-alpha02
@FastNative
public final external void setLabel(@NonNull String label)

Sets a debug label for the surface.

Parameters
@NonNull String label

The label to assign to the surface.

unconfigure

Added in 1.0.0-alpha02
@FastNative
public final external void unconfigure()

Unconfigures the surface, releasing the texture resources.