Material
interface Material : AutoCloseable
KhronosPbrMaterial |
Represents a lit PBR (Physically-Based Rendering) material, which defines the visual appearance of a surface by simulating its interaction with light. |
KhronosUnlitMaterial |
Represents an unlit material, which is not affected by scene lighting. |
Represents a Material in SceneCore.
A Material defines the visual appearance of a surface when rendered. It encapsulates properties like color, texture, and how light interacts with the surface.
It's important to close a Material when it's no longer needed to free up resources. This can be done by calling the close method or letting it get garbage collected.
Summary
Public functions
close
@MainThread
fun close(): Unit
Closes the given Material.
The Material can be explicitly closed at anytime or garbage collected. In both cases, its resources are freed and an exception will be thrown if the Material is used after being closed.