Libraries.Game.Graphics.VertexAttribute Documentation

Inherits from: Libraries.Language.Object

Summary

Variable Summary Table

VariablesDescription
integer COLOR_UNPACKED
integer unitAn optional unit/index specifier used for texture coordinates and bone weights.
integer COLOR_PACKED
integer usageAn integer formed from the bits of the above constants, representing its usage.
integer TANGENT
integer componentCountHow many components this attribute has.
text aliasThe alias used for this attribute in a ShaderProgram.
boolean normalizedWhether the values are normalized to either -1.0 and 1.0 (signed) or 0 and 1.0 (unsigned)
integer BINORMALAn integer formed from the bits of the above constants, representing its usage.
integer GENERIC
integer NORMAL
integer BONE_WEIGHT
integer typeThe OpenGL type of each component, e.g. GL_FLOAT, GL_UNSIGNED_BYTE, etc.
integer offsetThe offset of this attribute in bytes. Shouldn't be changed by the user.
integer POSITION
integer TEXTURE_COORDINATES

Actions Summary Table

ActionsDescription
Binormal()This action will return a new VertexAttribute set with the BINORMAL usage, and with fields set to appropriate values.
BoneWeight(integer unit)This action will return a new VertexAttribute set with the BONE_WEIGHT usage, and with fields set to appropriate values.
ColorPacked()This action will return a new VertexAttribute set with the COLOR_PACKED usage, and with fields set to appropriate values.
ColorUnpacked()This action will return a new VertexAttribute set with the COLOR_UNPACKED usage, and with fields set to appropriate values.
Compare(Libraries.Language.Object object)This action compares two object hash codes and returns an integer.
Equals(Libraries.Game.Graphics.VertexAttribute attribute)This action determines if the given VertexAttribute has the same usage, component count, alias, and unit values as this VertexAttribute.
Equals(Libraries.Language.Object object)This action determines if the given object is a VertexAttribute with the same usage, component count, alias, and unit values as this VertexAttribute.
GetHashCode()This action gets the hash code for an object.
GetKey()This action will return a unique integer value specifying the usage index and unit of this VertexAttribute.
Normal()This action will return a new VertexAttribute set with the NORMAL usage, and with fields set to appropriate values.
Position()This action will return a new VertexAttribute set with the POSITION usage, and with fields set to appropriate values.
SetAttribute(integer usage, integer componentCount, text alias, integer index)This action will set the Attribute using the given usage value, component count, alias, and index.
SetAttribute(integer usage, integer componentCount, text alias)This action will set the Attribute using the given usage value, component count, and alias.
Tangent()This action will return a new VertexAttribute set with the TANGENT usage, and with fields set to appropriate values.
TextureCoordinates(integer unit)This action will return a new VertexAttribute set with the TEXTURE_COORDINATES usage, and with fields set to appropriate values.

Actions Documentation

Binormal()

This action will return a new VertexAttribute set with the BINORMAL usage, and with fields set to appropriate values.

Return

Libraries.Game.Graphics.VertexAttribute:

BoneWeight(integer unit)

This action will return a new VertexAttribute set with the BONE_WEIGHT usage, and with fields set to appropriate values.

Parameters

Return

Libraries.Game.Graphics.VertexAttribute:

ColorPacked()

This action will return a new VertexAttribute set with the COLOR_PACKED usage, and with fields set to appropriate values.

Return

Libraries.Game.Graphics.VertexAttribute:

ColorUnpacked()

This action will return a new VertexAttribute set with the COLOR_UNPACKED usage, and with fields set to appropriate values.

Return

Libraries.Game.Graphics.VertexAttribute:

Compare(Libraries.Language.Object object)

This action compares two object hash codes and returns an integer. The result is larger if this hash code is larger than the object passed as a parameter, smaller, or equal. In this case, -1 means smaller, 0 means equal, and 1 means larger. This action was changed in Quorum 7 to return an integer, instead of a CompareResult object, because the previous implementation was causing efficiency issues.

Example Code

Object o
        Object t
        integer result = o:Compare(t) //1 (larger), 0 (equal), or -1 (smaller)

Parameters

Return

integer: The Compare result, Smaller, Equal, or Larger.

Equals(Libraries.Game.Graphics.VertexAttribute attribute)

This action determines if the given VertexAttribute has the same usage, component count, alias, and unit values as this VertexAttribute.

Parameters

Return

boolean:

Equals(Libraries.Language.Object object)

This action determines if the given object is a VertexAttribute with the same usage, component count, alias, and unit values as this VertexAttribute.

Parameters

Return

boolean:

GetHashCode()

This action gets the hash code for an object.

Example Code

Object o
        integer hash = o:GetHashCode()

Return

integer: The integer hash code of the object.

GetKey()

This action will return a unique integer value specifying the usage index and unit of this VertexAttribute.

Return

integer:

Normal()

This action will return a new VertexAttribute set with the NORMAL usage, and with fields set to appropriate values.

Return

Libraries.Game.Graphics.VertexAttribute:

Position()

This action will return a new VertexAttribute set with the POSITION usage, and with fields set to appropriate values.

Return

Libraries.Game.Graphics.VertexAttribute:

SetAttribute(integer usage, integer componentCount, text alias, integer index)

This action will set the Attribute using the given usage value, component count, alias, and index. Users are encouraged to use one of the provided helper actions to produce attributes with the proper values, e.g. Position or Normal.

Parameters

SetAttribute(integer usage, integer componentCount, text alias)

This action will set the Attribute using the given usage value, component count, and alias. Users are encouraged to use one of the provided helper actions to produce attributes with the proper values, e.g. Position or Normal.

Parameters

Tangent()

This action will return a new VertexAttribute set with the TANGENT usage, and with fields set to appropriate values.

Return

Libraries.Game.Graphics.VertexAttribute:

TextureCoordinates(integer unit)

This action will return a new VertexAttribute set with the TEXTURE_COORDINATES usage, and with fields set to appropriate values.

Parameters

Return

Libraries.Game.Graphics.VertexAttribute: