Package icyllis.arc3d.granite

# Class GlyphVector

java.lang.Object
icyllis.arc3d.granite.DrawAtlas.PlotBulkUseUpdater
icyllis.arc3d.granite.GlyphVector

public class GlyphVector extends DrawAtlas.PlotBulkUseUpdater
GlyphVector provides a way to delay the lookup of `Glyphs` until the code is running on the GPU in single threaded mode. The GlyphVector is created in a multi-threaded environment, but the StrikeCache is only single threaded (and must be single threaded because of the atlas).

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `GlyphVector(StrikeDesc strikeDesc, int[] glyphs)`
  The strikeDesc and glyphs must be immutable, no copy will be made.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `int`
  `getGlyphCount()`
  `BakedGlyph[]`
  `getGlyphs()`
  `long`
  `getMemorySize()`
  `int`
  `prepareGlyphs(int start, int end, int maskFormat, RecordingContext context)`
  Update atlas for glyphs in the given range if needed, returns the number of glyphs that are updated (may less than end-start if atlas is full).

  ### Methods inherited from class icyllis.arc3d.granite.DrawAtlas.PlotBulkUseUpdater

  `add, clear, count, dataAt`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### GlyphVector

    public GlyphVector(StrikeDesc strikeDesc, int[] glyphs)
    The strikeDesc and glyphs must be immutable, no copy will be made.

- ## Method Details

  - ### getGlyphs

    public BakedGlyph[] getGlyphs()

  - ### getGlyphCount

    public int getGlyphCount()

  - ### prepareGlyphs

    public int prepareGlyphs(int start, int end, int maskFormat, RecordingContext context)
    Update atlas for glyphs in the given range if needed, returns the number of glyphs that are updated (may less than end-start if atlas is full). If an error occurred, returns the bitwise NOT (a negative value).

  - ### getMemorySize

    public long getMemorySize()
    Overrides:
      `getMemorySize` in class `DrawAtlas.PlotBulkUseUpdater`