Package icyllis.arc3d.granite
Class GlyphAtlasManager
java.lang.Object
icyllis.arc3d.granite.DrawAtlas.AtlasGenerationCounter
icyllis.arc3d.granite.GlyphAtlasManager
- All Implemented Interfaces:
AutoCloseable
Manages all baked glyphs and their texture atlases for raster text rendering.
-
Field Summary
Fields inherited from class icyllis.arc3d.granite.DrawAtlas.AtlasGenerationCounter
kInvalidGeneration, kMaxGeneration
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addGlyphAndSetLastUseToken
(@NonNull DrawAtlas.PlotBulkUseUpdater updater, @NonNull BakedGlyph glyph, int maskFormat, long token) int
addGlyphToAtlas
(@NonNull Glyph glyph, @NonNull BakedGlyph bakedGlyph) void
close()
void
compact()
void
long
getAtlasGeneration
(int maskFormat) getCurrentTexture
(int maskFormat) boolean
hasGlyph
(int maskFormat, @NonNull BakedGlyph glyph) boolean
initAtlas
(int maskFormat) Initialize atlas if not.void
purge()
boolean
void
setLastUseTokenBulk
(int maskFormat, DrawAtlas.PlotBulkUseUpdater updater, long token) Methods inherited from class icyllis.arc3d.granite.DrawAtlas.AtlasGenerationCounter
next
-
Constructor Details
-
GlyphAtlasManager
-
-
Method Details
-
close
public void close()- Specified by:
close
in interfaceAutoCloseable
-
initAtlas
public boolean initAtlas(int maskFormat) Initialize atlas if not. This function *must* be called first, before other functions which use the atlas. -
getCurrentTexture
-
hasGlyph
-
addGlyphToAtlas
-
addGlyphAndSetLastUseToken
public void addGlyphAndSetLastUseToken(@NonNull DrawAtlas.PlotBulkUseUpdater updater, @NonNull BakedGlyph glyph, int maskFormat, long token) -
getAtlasGeneration
public long getAtlasGeneration(int maskFormat) -
setLastUseTokenBulk
-
recordUploads
-
evictAtlases
public void evictAtlases() -
compact
public void compact() -
purge
public void purge()
-