Skip to content

Class GpuModel

Namespace: Apogee.Rendering
Assembly: Apogee.Rendering.dll

A on the GPU: its vertices, indices, materials and textures in buffers and in the bindless heap. It is placed in the world any number of times (by a , or by entities with a ); each placement costs one instance record per mesh instance, never another copy of the data.

public sealed class GpuModel : IDisposable

Inheritance

object ← GpuModel

Implements

IDisposable

Inherited Members

object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.ReferenceEquals(object?, object?), object.ToString()

Properties

BoundsMax

public Vector3 BoundsMax { get; }

Property Value

Vector3

BoundsMin

The box around the model, in its own space.

public Vector3 BoundsMin { get; }

Property Value

Vector3

Lights

Point and spot lights the model came with, in its own space.

public IReadOnlyList<LightData> Lights { get; }

Property Value

IReadOnlyList<LightData>

MeshCount

The number of mesh instances: the draws one placement of the model makes.

public int MeshCount { get; }

Property Value

int

Name

public string Name { get; }

Property Value

string

SunColor

public Vector3 SunColor { get; }

Property Value

Vector3

SunDirection

The direction toward the model's sun (when it has a directional light), and its color times illuminance (zero when it has none).

public Vector3? SunDirection { get; }

Property Value

Vector3?

Methods

Dispose()

Waits for the GPU to finish with the model, then frees it. Draw frames that use a model before disposing it.

public void Dispose()