Struct GraphicsApiVersion
- Namespace
- NeoVeldrid
- Assembly
- NeoVeldrid.dll
Describes the version number of the underlying graphics API of a GraphicsBackend.
public readonly struct GraphicsApiVersion : IEquatable<GraphicsApiVersion>
- Implements
- Inherited Members
Constructors
GraphicsApiVersion(int, int, int, int)
public GraphicsApiVersion(int major, int minor, int subminor, int patch)
Parameters
Properties
IsKnown
Is the version number valid? Defined as: Major > 0, Minor ≥ 0, Subminor ≥ 0, Patch ≥ 0.
public bool IsKnown { get; }
Property Value
Major
The major version component (e.g. the 4 in OpenGL 4.6).
public int Major { get; }
Property Value
Minor
The minor version component (e.g. the 6 in OpenGL 4.6).
public int Minor { get; }
Property Value
Patch
The patch or release version component (e.g. the release number in an OpenGL version string, or a Vulkan patch level).
public int Patch { get; }
Property Value
Subminor
The sub-minor version component, between Minor and Patch. Only a four-part version (such as a Vulkan conformance version) populates it, so it is typically 0.
public int Subminor { get; }
Property Value
Unknown
An unknown or invalid version number. Defined as: 0.0.0.0.
public static GraphicsApiVersion Unknown { get; }
Property Value
Methods
Equals(GraphicsApiVersion)
Indicates whether the current object is equal to another object of the same type.
public bool Equals(GraphicsApiVersion other)
Parameters
otherGraphicsApiVersionAn object to compare with this object.
Returns
Equals(object)
Indicates whether this instance and a specified object are equal.
public override bool Equals(object obj)
Parameters
objobjectThe object to compare with the current instance.
Returns
- bool
true if
objand this instance are the same type and represent the same value; otherwise, false.
GetHashCode()
Returns the hash code for this instance.
public override int GetHashCode()
Returns
- int
A 32-bit signed integer that is the hash code for this instance.
ToString()
Returns the fully qualified type name of this instance.
public override string ToString()
Returns
- string
The fully qualified type name.
TryParseGLVersion(string, out GraphicsApiVersion)
Attempts to parse an OpenGL or OpenGL ES version string, extracting the version number and ignoring any surrounding vendor or API text.
public static bool TryParseGLVersion(string versionString, out GraphicsApiVersion version)
Parameters
versionStringstringThe version string to parse (e.g.
"4.6.0 NVIDIA 551.23").versionGraphicsApiVersionThe parsed version, or Unknown if parsing fails.
Returns
Operators
operator ==(GraphicsApiVersion, GraphicsApiVersion)
public static bool operator ==(GraphicsApiVersion version1, GraphicsApiVersion version2)
Parameters
version1GraphicsApiVersionversion2GraphicsApiVersion
Returns
operator !=(GraphicsApiVersion, GraphicsApiVersion)
public static bool operator !=(GraphicsApiVersion version1, GraphicsApiVersion version2)
Parameters
version1GraphicsApiVersionversion2GraphicsApiVersion