Package limn.render3d
Enum Class MeshUsage
- All Implemented Interfaces:
Serializable,Comparable<MeshUsage>,Constable
How often a mesh's contents change, declared at upload, because a GPU buffer's
usage is fixed when it is allocated.
STATIC is written once and never again: geometry loaded from a file,
a procedural primitive, anything whose shape outlives the frame that made it.
DYNAMIC sizes its buffers from the first upload and can then be
rewritten every frame through GpuMesh.update(limn.render3d.MeshData) without allocating, for
geometry that is rebuilt rather than transformed (a particle batch, a live
surface plot, a spline cage being dragged).
There is no third "stream" level. The distinction between "rewritten occasionally" and "rewritten every frame" has no portable meaning, and a hint nobody can reason about is a hint nobody should have to choose.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionRewritable throughGpuMesh.update(limn.render3d.MeshData), ideally without reallocating.Uploaded once;GpuMesh.update(limn.render3d.MeshData)is rejected. -
Method Summary
-
Enum Constant Details
-
STATIC
Uploaded once;GpuMesh.update(limn.render3d.MeshData)is rejected. -
DYNAMIC
Rewritable throughGpuMesh.update(limn.render3d.MeshData), ideally without reallocating.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-