DepthRange enum
What a backend's clip space maps depth onto.
Metal and Vulkan put the near plane at 0 and the far plane at 1. OpenGL puts
them at -1 and 1, and WebGL2 has no way to change that — glClipControl is
not exposed there.
Not a detail that can be papered over. A projection built for one and fed to the other does not error: with an OpenGL matrix on Metal roughly half the view volume lands behind the near plane and the model looks eaten; the other way round everything still draws, in the correct order, using half the depth buffer — so it costs precision and shows up as z-fighting on surfaces that were fine on the other backend. The second is worse to diagnose, because nothing looks wrong until something does.
Values
- zeroToOne → const DepthRange
-
Near at 0, far at 1. Metal, Vulkan, Impeller.
- negativeOneToOne → const DepthRange
-
Near at -1, far at 1. OpenGL, WebGL.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- index → int
-
A numeric identifier for the enumerated value.
no setterinherited
- name → String
-
Available on Enum, provided by the EnumName extension
The name of the enum value.no setter - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Constants
-
values
→ const List<
DepthRange> - A constant List of the values in this enum, in order of their declaration.