use of hellfirepvp.astralsorcery.client.screen.journal.perk.PerkRenderGroup in project AstralSorcery by HellFirePvP.
the class ScreenJournalPerkTree method initializeDrawBuffer.
public static void initializeDrawBuffer() {
PerkTree.PERK_TREE.getVersion(LogicalSide.CLIENT).ifPresent(version -> {
if (lastPreparedBuffer == null || version.longValue() != lastPreparedBuffer) {
drawBuffer = new BatchPerkContext();
searchContext = drawBuffer.addContext(SpritesAS.SPR_PERK_SEARCH, BatchPerkContext.PRIORITY_OVERLAY);
sealContext = drawBuffer.addContext(SpritesAS.SPR_PERK_SEAL, BatchPerkContext.PRIORITY_FOREGROUND);
List<PerkRenderGroup> groups = Lists.newArrayList();
for (PerkTreePoint<?> p : PerkTree.PERK_TREE.getPerkPoints(LogicalSide.CLIENT)) {
p.addGroups(groups);
}
for (PerkRenderGroup group : groups) {
group.batchRegister(drawBuffer);
}
lastPreparedBuffer = version;
}
});
}
Aggregations