Libraries.Game.Graphics.VertexAttribute Documentation

Inherits from: Libraries.Language.Object

Summary

Variable Summary Table

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

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 a CompareResult.
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 a CompareResult. The compare result is either larger if this hash code is larger than the object passed as a parameter, smaller, or equal.

Example Code

use Libraries.Language.Support.CompareResult
        Object o
        Object t
        CompareResult result = o:Compare(t)

Parameters

Return

Libraries.Language.Support.CompareResult: 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: