Libraries.Game.Graphics.Shaders.BorderedFontShaderMapping Documentation

Inherits from: Libraries.Game.Graphics.Shaders.BatchingShaderMapping2D, Libraries.Game.Graphics.Shaders.ShaderMapping, Libraries.Language.Object

Actions Documentation

Begin(Libraries.Game.Graphics.Shaders.ShaderProgram program, Libraries.Game.Graphics.Camera camera)

BeginBatch(Libraries.Game.Graphics.Shaders.ShaderProgram program)

This action is called just before the first item in a Batch is passed to the MapInputs call.

Parameters

CanIncludeInBatch(Libraries.Game.Graphics.Shaders.ShaderProgram program, Libraries.Game.Graphics.Drawable drawable)

This action determines if the provided Drawable can be included in the current batch. If this returns false, then the current batch must be rendered before this Drawable can be added. This action should only be called if the mapping supports batching. By default, a mapping that doesn't support batching will return false from this action.

Parameters

Return

boolean:

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.

Parameters

Return

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

Example

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

End(Libraries.Game.Graphics.Shaders.ShaderProgram program)

Equals(Libraries.Language.Object object)

This action determines if two objects are equal based on their hash code values.

Parameters

Return

boolean: True if the hash codes are equal and false if they are not equal.

Example

use Libraries.Language.Object
use Libraries.Language.Types.Text
Object o
Text t
boolean result = o:Equals(t)

GetBatchingMesh()

Returns the Mesh used by this ShaderMapping to support batching. By default, this returns undefined, but it can be overridden to provide a custom Mesh. If this action returns undefined, no batching will be performed using this ShaderMapping.

Return

Libraries.Game.Graphics.Mesh:

GetHashCode()

This action gets the hash code for an object.

Return

integer: The integer hash code of the object.

Example

Object o
integer hash = o:GetHashCode()

GetVertexSize()

Return

integer

IsBatching()

This action returns true if the ShaderMapping currently has a batch awaiting rendering, or false if there are no Drawables awaiting rendering in a batch. This action should only be called if the mapping supports batching. By default, a mapping that doesn't support batching will return false from this action.

Return

boolean:

MapInputs(Libraries.Game.Graphics.Shaders.ShaderProgram program, Libraries.Game.Graphics.Renderable renderable)

TO-DO: Figure out what this needs to be for 3D (that problem gets more complicated due to optional components)

Parameters

MapInputs(Libraries.Game.Graphics.Shaders.ShaderProgram program, Libraries.Game.Graphics.Drawable drawable)

This action is called when it is time for the ShaderMapping to render its current batch with the given ShaderProgram.

Parameters

RenderBatch(Libraries.Game.Graphics.Shaders.ShaderProgram program, Libraries.Game.Graphics.Camera camera)

This action is called when it is time for the ShaderMapping to render its current batch with the given ShaderProgram.

Parameters

SetVertexData(Libraries.Game.Graphics.Shaders.ShaderProgram program, Libraries.Game.Graphics.Drawable drawable, Libraries.Game.Graphics.DrawableShape shape)

SupportsBatching()

Return

boolean